home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / seta.c < prev    next >
C/C++ Source or Header  |  2000-04-10  |  92KB  |  2,831 lines

  1. /***************************************************************************
  2.  
  3.                                 -= Seta Games =-
  4.  
  5.                     driver by    Luca Elia (eliavit@unina.it)
  6.  
  7.  
  8. CPU:    68000 + 65C02 [Optional]
  9. Sound:    Custom 16 Bit PCM
  10. Other:  NEC D4701 [?]
  11.  
  12. The sound chip is labeled X1-010, while the X0-006 seems to be the 65C02
  13.  
  14. ---------------------------------------------------------------------------
  15. Game            Year    Licensed To         Issues / Notes
  16. ---------------------------------------------------------------------------
  17. Thundercade        1988    Taito                Incomplete Dump: The Graphics Are Missing !
  18. Twin Eagle        1988    Taito                Some Wrong Tiles
  19. Caliber 50        1988                        Incomplete Dump: The 68000 Code Is Missing !
  20. DownTown        1989    Taito / RomStar
  21. U.S. Classic    1989    Taito / RomStar        Wrong Colors
  22. Arbalester        1989    Taito / RomStar
  23. Meta Fox        1989    Taito / RomStar
  24. Zing Zing Zip    1992    Allumer / Tecmo
  25. MS Gundam        1993    Banpresto            Not Working
  26. War Of Aero        1993    Yang Cheng
  27. ---------------------------------------------------------------------------
  28.  
  29.  
  30. To do: better sound, nvram.
  31.  
  32.  
  33. ***************************************************************************/
  34. #include "driver.h"
  35. #include "vidhrdw/generic.h"
  36.  
  37. /* Variables and functions only used here */
  38.  
  39. static unsigned char *sharedram;
  40.  
  41.  
  42. /* Variables that vidhrdw has access to */
  43.  
  44.  
  45.  
  46. /* Variables and functions defined in vidhrdw */
  47. extern unsigned char *seta_vram_0, *seta_vram_1, *seta_vctrl_0;
  48. extern unsigned char *seta_vram_2, *seta_vram_3, *seta_vctrl_2;
  49. extern unsigned char *seta_vregs;
  50.  
  51. extern int seta_tiles_offset;
  52.  
  53. WRITE_HANDLER( seta_vram_0_w );
  54. WRITE_HANDLER( seta_vram_1_w );
  55. WRITE_HANDLER( seta_vram_2_w );
  56. WRITE_HANDLER( seta_vram_3_w );
  57. WRITE_HANDLER( seta_vregs_w );
  58.  
  59. void zingzip_vh_init_palette(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  60. void usclssic_vh_init_palette(unsigned char *palette, unsigned short *colortable,const unsigned char *color_prom);
  61.  
  62. int  seta_vh_start_1_layer(void);
  63. int  seta_vh_start_2_layers(void);
  64.  
  65. void seta_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  66. void seta_vh_screenrefresh_no_layers(struct osd_bitmap *bitmap,int full_refresh);
  67.  
  68.  
  69.  
  70. /* Variables and functions defined in sndhrdw */
  71.  
  72. extern unsigned char *seta_sound_ram;
  73.  
  74. READ_HANDLER( seta_sound_r );
  75. READ_HANDLER( seta_sound_word_r );
  76. WRITE_HANDLER( seta_sound_w );
  77. WRITE_HANDLER( seta_sound_word_w );
  78. int  seta_sh_start_4KHz(const struct MachineSound *msound);
  79. int  seta_sh_start_6KHz(const struct MachineSound *msound);
  80. int  seta_sh_start_8KHz(const struct MachineSound *msound);
  81.  
  82.  
  83. static struct CustomSound_interface seta_4KHz_interface =
  84. {
  85.     seta_sh_start_4KHz,
  86.     0,
  87.     0,
  88. };
  89. static struct CustomSound_interface seta_6KHz_interface =
  90. {
  91.     seta_sh_start_6KHz,
  92.     0,
  93.     0,
  94. };
  95. static struct CustomSound_interface seta_8KHz_interface =
  96. {
  97.     seta_sh_start_8KHz,
  98.     0,
  99.     0,
  100. };
  101.  
  102.  
  103.  
  104. /***************************************************************************
  105.  
  106.  
  107.                                 Main CPU
  108.  
  109. (for debugging it is useful to be able to peek at some memory regions that
  110.  the game writes to but never reads from. I marked this regions with an empty
  111.  comment to distinguish them, since there's always the possibility that some
  112.  games actually read from this kind of regions, expecting some hardware
  113.  register's value there, instead of the data they wrote)
  114.  
  115. ***************************************************************************/
  116.  
  117.  
  118. /*
  119.  
  120.  Shared RAM:
  121.  
  122.  The 65c02 sees a linear array of bytes that is mapped, for the 68000,
  123.  to a linear array of words whose low order bytes hold the data
  124.  
  125. */
  126.  
  127. static READ_HANDLER( sharedram_68000_r )
  128. {
  129.     return sharedram[offset/2];
  130. }
  131.  
  132. static WRITE_HANDLER( sharedram_68000_w )
  133. {
  134.     sharedram[offset/2] = data & 0xff;
  135. }
  136.  
  137.  
  138. static WRITE_HANDLER( sub_ctrl_w )
  139. {
  140.     static int old_data = 0;
  141.  
  142.     switch(offset)
  143.     {
  144.         case 0:    // bit 0: reset sub cpu?
  145.             if ( !(old_data&1) && (data&1) ) cpu_set_reset_line(1,PULSE_LINE);
  146.             old_data = data;
  147.             break;
  148.  
  149.         case 2:    // ?
  150.             break;
  151.  
  152.         case 4:    // not sure
  153.             soundlatch_w(0,data&0xff);
  154.             break;
  155.  
  156.         case 6:    // not sure
  157.             soundlatch2_w(0,data&0xff);
  158.             break;
  159.     }
  160.  
  161. }
  162.  
  163. static READ_HANDLER( seta_dsw_r )
  164. {
  165.     int dsw = readinputport(3);
  166.     if (offset == 0)    return (dsw >> 8) & 0xff;
  167.     else                return (dsw >> 0) & 0xff;
  168. }
  169.  
  170.  
  171. /***************************************************************************
  172.                 DownTown, Meta Fox, Twin Eagle, Arbalester
  173.             (with slight variations, and protections hooked in)
  174. ***************************************************************************/
  175.  
  176. static struct MemoryReadAddress downtown_readmem[] =
  177. {
  178.     { 0x000000, 0x09ffff, MRA_ROM                    },    // ROM
  179.     { 0xf00000, 0xffffff, MRA_BANK1                    },    // RAM
  180.     { 0x100000, 0x103fff, seta_sound_word_r            },    // Sound
  181.     { 0x600000, 0x600003, seta_dsw_r                },    // DSW
  182.     { 0x700000, 0x7003ff, MRA_BANK3                    },    // Palette
  183. /**/{ 0x800000, 0x800005, MRA_BANK4                    },    // VRAM Ctrl
  184.     { 0x900000, 0x901fff, MRA_BANK5                    },    // VRAM
  185.     { 0x902000, 0x903fff, MRA_BANK6                    },    // VRAM
  186.     { 0xb00000, 0xb00fff, sharedram_68000_r            },    // Shared RAM
  187. /**/{ 0xc00000, 0xc00001, MRA_BANK7                    },    // ? $4000
  188. /**/{ 0xd00000, 0xd00607, MRA_BANK8                    },    // Sprites Y
  189.     { 0xe00000, 0xe03fff, MRA_BANK9                    },    // Sprites Code + X + Attr
  190.     { -1 }
  191. };
  192.  
  193. static struct MemoryWriteAddress downtown_writemem[] =
  194. {
  195.     { 0x000000, 0x09ffff, MWA_ROM                                },    // ROM
  196.     { 0xf00000, 0xffffff, MWA_BANK1                                },    // RAM
  197.     { 0x100000, 0x103fff, seta_sound_word_w, &seta_sound_ram    },    // Sound
  198.     { 0x500000, 0x500001, MWA_NOP                                },    // ?
  199.     { 0x700000, 0x7003ff, paletteram_xRRRRRGGGGGBBBBB_word_w, &paletteram    },    // Palette
  200.     { 0x800000, 0x800005, MWA_BANK4, &seta_vctrl_0                },    // VRAM Ctrl
  201.     { 0x900000, 0x901fff, seta_vram_0_w, &seta_vram_0            },    // VRAM
  202.     { 0x902000, 0x903fff, seta_vram_1_w, &seta_vram_1            },    // VRAM
  203.     { 0xa00000, 0xa00007, sub_ctrl_w                            },    // Sub CPU Control?
  204.     { 0xb00000, 0xb00fff, sharedram_68000_w                        },    // Shared RAM
  205.     { 0xc00000, 0xc00001, MWA_BANK7                                },    // ? $4000
  206.     { 0xd00000, 0xd00607, MWA_BANK8, &spriteram                    },    // Sprites Y
  207.     { 0xe00000, 0xe03fff, MWA_BANK9, &spriteram_2                },    // Sprites Code + X + Attr
  208.     { -1 }
  209. };
  210.  
  211.  
  212.  
  213.  
  214. /***************************************************************************
  215.                             Mobile Suit Gundam
  216. ***************************************************************************/
  217.  
  218.  
  219. static struct MemoryReadAddress msgundam_readmem[] =
  220. {
  221.     { 0x000000, 0x07ffff, MRA_ROM                },    // ROM
  222.     { 0x100000, 0x1fffff, MRA_ROM                },    // ROM
  223.     { 0x200000, 0x24ffff, MRA_BANK1                },    // RAM
  224.     { 0x400000, 0x400001, input_port_0_r        },    // P1
  225.     { 0x400002, 0x400003, input_port_1_r        },    // P2
  226.     { 0x400004, 0x400005, input_port_2_r        },    // Coins
  227.     { 0x500000, 0x500005, MRA_BANK4                },    // Coin Lockout + Video Registers
  228.     { 0x600000, 0x600003, seta_dsw_r            },    // DSW
  229.     { 0x700400, 0x700fff, MRA_BANK5                },    // Palette
  230.     { 0x800000, 0x800607, MRA_BANK6                },    // Sprites Y
  231. /**/{ 0x880000, 0x880001, MRA_BANK7                },    // ? 0x4000
  232.     { 0x900000, 0x903fff, MRA_BANK8                },    // Sprites Code + X + Attr
  233.     { 0xa00000, 0xa03fff, MRA_BANK9                },    // VRAM 0&1
  234.     { 0xa80000, 0xa83fff, MRA_BANK10            },    // VRAM 2&3
  235.     { 0xb00000, 0xb00005, MRA_BANK11            },    // VRAM 0&1 Ctrl
  236.     { 0xb80000, 0xb80005, MRA_BANK12            },    // VRAM 1&2 Ctrl
  237.     { 0xc00000, 0xc03fff, seta_sound_word_r        },    // Sound
  238.     { -1 }
  239. };
  240. static struct MemoryWriteAddress msgundam_writemem[] =
  241. {
  242.     { 0x000000, 0x07ffff, MWA_ROM                                },    // ROM
  243.     { 0x100000, 0x1fffff, MWA_ROM                                },    // ROM
  244.     { 0x200000, 0x24ffff, MWA_BANK1                                },    // RAM
  245.     { 0x400000, 0x400001, MWA_NOP                                },    // ? 0
  246.     { 0x400004, 0x400005, MWA_NOP                                },    // ? 0
  247.     { 0x500000, 0x500005, seta_vregs_w, &seta_vregs                },    // Coin Lockout + Video Registers
  248.     { 0x700400, 0x700fff, paletteram_xRRRRRGGGGGBBBBB_word_w, &paletteram    },    // Palette
  249.     { 0x800000, 0x800607, MWA_BANK6 , &spriteram                },    // Sprites Y
  250.     { 0x880000, 0x880001, MWA_BANK7                                },    // ? 0x4000
  251.     { 0x900000, 0x903fff, MWA_BANK8 , &spriteram_2                },    // Sprites Code + X + Attr
  252.     { 0xa00000, 0xa01fff, seta_vram_0_w, &seta_vram_0            },    // VRAM 0
  253.     { 0xa02000, 0xa03fff, seta_vram_1_w, &seta_vram_1            },    // VRAM 1
  254.     { 0xa80000, 0xa81fff, seta_vram_2_w, &seta_vram_2            },    // VRAM 2
  255.     { 0xa82000, 0xa83fff, seta_vram_3_w, &seta_vram_3            },    // VRAM 3
  256.     { 0xb00000, 0xb00005, MWA_BANK11, &seta_vctrl_0                },    // VRAM 0&1 Ctrl
  257.     { 0xb80000, 0xb80005, MWA_BANK12, &seta_vctrl_2                },    // VRAM 2&3 Ctrl
  258.     { 0xc00000, 0xc03fff, seta_sound_word_w, &seta_sound_ram    },    // Sound
  259. //    { 0xd00000, 0xd00007, MWA_NOP                                },    // ?
  260.     { -1 }
  261. };
  262.  
  263.  
  264.  
  265.  
  266.  
  267. /***************************************************************************
  268.                                 Thundercade
  269. ***************************************************************************/
  270.  
  271. /* Mirror ram seems necessary since the e00000-e03fff area is not cleared
  272.    on startup. Level 2 int uses $e0000a as a counter that controls when
  273.    to write a value to the sub cpu, and when to read the result back.
  274.    If the check fails "error x0-006" is displayed (so the 65c02 should be
  275.    the x0-006). Hence if the counter is not cleared at startup the game
  276.    could check for the result before writing to sharedram! */
  277.  
  278.  
  279. static unsigned char *mirror_ram;
  280.  
  281. READ_HANDLER( mirror_ram_r )
  282. {
  283.     return READ_WORD(&mirror_ram[offset]);
  284. }
  285.  
  286. WRITE_HANDLER( mirror_ram_w )
  287. {
  288.     COMBINE_WORD_MEM(&mirror_ram[offset], data);
  289. }
  290.  
  291.  
  292. static struct MemoryReadAddress tndrcade_readmem[] =
  293. {
  294.     { 0x000000, 0x07ffff, MRA_ROM                    },    // ROM
  295.     { 0x380000, 0x3803ff, MRA_BANK1                    },    // Palette
  296. /**/{ 0x400000, 0x400001, MRA_BANK2                    },    // ? $4000
  297. /**/{ 0x600000, 0x600607, MRA_BANK3                    },    // Sprites Y
  298.     { 0xa00000, 0xa00fff, sharedram_68000_r            },    // Shared RAM
  299.     { 0xc00000, 0xc03fff, MRA_BANK4                    },    // Sprites Code + X + Attr
  300.     { 0xe00000, 0xe03fff, MRA_BANK5                    },    // RAM (Mirrored?)
  301.     { 0xffc000, 0xffffff, mirror_ram_r                },    // RAM (Mirrored?)
  302.     { -1 }
  303. };
  304.  
  305. static struct MemoryWriteAddress tndrcade_writemem[] =
  306. {
  307.     { 0x000000, 0x07ffff, MWA_ROM                            },    // ROM
  308.     { 0x380000, 0x3803ff, paletteram_xRRRRRGGGGGBBBBB_word_w, &paletteram    },    // Palette
  309.     { 0x400000, 0x400001, MWA_BANK2                            },    // ? $4000
  310.     { 0x600000, 0x600607, MWA_BANK3, &spriteram                },    // Sprites Y
  311.     { 0x800000, 0x800007, sub_ctrl_w                        },    // Sub CPU Control?
  312.     { 0xa00000, 0xa00fff, sharedram_68000_w                    },    // Shared RAM
  313.     { 0xc00000, 0xc03fff, MWA_BANK4, &spriteram_2            },    // Sprites Code + X + Attr
  314.     { 0xe00000, 0xe03fff, MWA_BANK5, &mirror_ram            },    // RAM (Mirrored?)
  315.     { 0xffc000, 0xffffff, mirror_ram_w                        },    // RAM (Mirrored?)
  316.     { -1 }
  317. };
  318.  
  319.  
  320.  
  321.  
  322.  
  323. /***************************************************************************
  324.                                 U.S. Classic
  325. ***************************************************************************/
  326.  
  327. READ_HANDLER( usclssic_dsw_r )
  328. {
  329.     switch (offset)
  330.     {
  331.         case 0:    return (readinputport(3) >>  8) & 0xf;
  332.         case 2:    return (readinputport(3) >> 12) & 0xf;
  333.         case 4:    return (readinputport(3) >>  0) & 0xf;
  334.         case 6:    return (readinputport(3) >>  4) & 0xf;
  335.     }
  336.     return 0;
  337. }
  338.  
  339. READ_HANDLER( usclssic_trackball_x_r )
  340. {
  341.     switch (offset)
  342.     {
  343.         case 0:    return (readinputport(0) >> 0) & 0xff;
  344.         case 2:    return (readinputport(0) >> 8) & 0xff;
  345.     }
  346.     return 0;
  347. }
  348.  
  349. READ_HANDLER( usclssic_trackball_y_r )
  350. {
  351.     switch (offset)
  352.     {
  353.         case 0:    return (readinputport(1) >> 0) & 0xff;
  354.         case 2:    return (readinputport(1) >> 8) & 0xff;
  355.     }
  356.     return 0;
  357. }
  358.  
  359.  
  360. WRITE_HANDLER( usclssic_lockout_w )
  361. {
  362.     static int old_tiles_offset = 0;
  363.  
  364.     seta_tiles_offset = (data & 0x10) ? 0x4000: 0;
  365.     if (old_tiles_offset != seta_tiles_offset)    tilemap_mark_all_tiles_dirty(ALL_TILEMAPS);
  366.     old_tiles_offset = seta_tiles_offset;
  367.  
  368.     coin_lockout_w(0, ((~data) >> 2) & 1 );
  369.     coin_lockout_w(1, ((~data) >> 3) & 1 );
  370. }
  371.  
  372.  
  373. WRITE_HANDLER( usclssic_soundlatch_w )
  374. {
  375.     soundlatch_w(0,data&0xff);
  376.     cpu_set_nmi_line(1,PULSE_LINE);
  377. }
  378.  
  379.  
  380.  
  381. static struct MemoryReadAddress usclssic_readmem[] =
  382. {
  383.     { 0x000000, 0x07ffff, MRA_ROM                    },    // ROM
  384.     { 0xff0000, 0xffffff, MRA_BANK1                    },    // RAM
  385.     { 0x800000, 0x800607, MRA_BANK2                    },    // Sprites Y
  386. /**/{ 0x900000, 0x900001, MRA_BANK3                    },    // ?
  387.     { 0xa00000, 0xa00005, MRA_BANK4                    },    // VRAM Ctrl
  388. /**/{ 0xb00000, 0xb003ff, MRA_BANK5                    },    // Palette
  389.     { 0xb40000, 0xb40003, usclssic_trackball_x_r    },    // TrackBall X
  390.     { 0xb40004, 0xb40007, usclssic_trackball_y_r    },    // TrackBall Y + Buttons
  391.     { 0xb40010, 0xb40011, input_port_2_r            },    // Coins
  392.     { 0xb40018, 0xb4001f, usclssic_dsw_r            },    // 2 DSWs
  393.     { 0xb80000, 0xb80001, MRA_NOP                    },    // watchdog (value is discarded)?
  394.     { 0xc00000, 0xc03fff, MRA_BANK6                    },    // Sprites Code + X + Attr
  395.     { 0xd00000, 0xd01fff, MRA_BANK7                    },    // VRAM
  396.     { 0xd02000, 0xd03fff, MRA_BANK8                    },    // VRAM
  397.     { 0xd04000, 0xd04fff, MRA_BANK9                    },    //
  398.     { 0xe00000, 0xe00fff, MRA_BANK10                },    // NVRAM? (odd bytes)
  399.     { -1 }
  400. };
  401.  
  402. static struct MemoryWriteAddress usclssic_writemem[] =
  403. {
  404.     { 0x000000, 0x07ffff, MWA_ROM                            },    // ROM
  405.     { 0xff0000, 0xffffff, MWA_BANK1                            },    // RAM
  406.     { 0x800000, 0x800607, MWA_BANK2 , &spriteram            },    // Sprites Y
  407.     { 0x900000, 0x900001, MWA_BANK3                            },    // ? $4000
  408.     { 0xa00000, 0xa00005, MWA_BANK4, &seta_vctrl_0            },    // VRAM Ctrl
  409.     { 0xb00000, 0xb003ff, paletteram_xRRRRRGGGGGBBBBB_word_w, &paletteram    },    // Palette
  410.     { 0xb40000, 0xb40001, usclssic_lockout_w                },    // Coin Lockout + Tiles Banking
  411.     { 0xb40010, 0xb40011, usclssic_soundlatch_w                },    // To Sub CPU
  412.     { 0xb40018, 0xb40019, watchdog_reset_w                    },    // Watchdog
  413.     { 0xb4000a, 0xb4000b, MWA_NOP                            },    // ? (value's not important. In lev2&6)
  414.     { 0xc00000, 0xc03fff, MWA_BANK6 , &spriteram_2            },    // Sprites Code + X + Attr
  415.     { 0xd00000, 0xd01fff, seta_vram_0_w, &seta_vram_0        },    // VRAM
  416.     { 0xd02000, 0xd03fff, seta_vram_1_w, &seta_vram_1        },    // VRAM
  417.     { 0xd04000, 0xd04fff, MWA_BANK9                            },    //
  418.     { 0xe00000, 0xe00fff, MWA_BANK10                        },    // NVRAM? (odd bytes)
  419.     { -1 }
  420. };
  421.  
  422.  
  423.  
  424. /***************************************************************************
  425.                         War of Aero / Zing Zing Zip
  426. ***************************************************************************/
  427.  
  428. static struct MemoryReadAddress wrofaero_readmem[] =
  429. {
  430.     { 0x000000, 0x07ffff, MRA_ROM                },    // ROM
  431.     { 0x200000, 0x20ffff, MRA_BANK1                },    // RAM (main ram for zingzip, wrofaero writes to 20f000-20ffff)
  432.     { 0x300000, 0x30ffff, MRA_BANK2                },    // RAM (wrofaero only?)
  433.     { 0x400000, 0x400001, input_port_0_r        },    // P1
  434.     { 0x400002, 0x400003, input_port_1_r        },    // P2
  435.     { 0x400004, 0x400005, input_port_2_r        },    // Coins
  436.     { 0x600000, 0x600003, seta_dsw_r            },    // DSW
  437.     { 0x700400, 0x700fff, MRA_BANK3                },    // Palette
  438.     { 0x701000, 0x7013ff, MRA_BANK13            },    // ? Palette ?
  439.     { 0x800000, 0x803fff, MRA_BANK4                },    // VRAM 0&1
  440.     { 0x880000, 0x883fff, MRA_BANK5                },    // VRAM 2&3
  441. /**/{ 0x900000, 0x900005, MRA_BANK6                },    // VRAM 0&1 Ctrl
  442. /**/{ 0x980000, 0x980005, MRA_BANK7                },    // VRAM 2&3 Ctrl
  443. /**/{ 0xa00000, 0xa00607, MRA_BANK8                },    // Sprites Y
  444. /**/{ 0xa80000, 0xa80001, MRA_BANK9                },    // ? 0x4000
  445.     { 0xb00000, 0xb03fff, MRA_BANK10            },    // Sprites Code + X + Attr
  446. /**/{ 0xc00000, 0xc03fff, seta_sound_word_r        },    // Sound
  447.     { -1 }
  448. };
  449. static struct MemoryWriteAddress wrofaero_writemem[] =
  450. {
  451.     { 0x000000, 0x07ffff, MWA_ROM                                },    // ROM
  452.     { 0x200000, 0x20ffff, MWA_BANK1                                },    // RAM
  453.     { 0x300000, 0x30ffff, MWA_BANK2                                },    // RAM (wrofaero only?)
  454.     { 0x500000, 0x500005, seta_vregs_w, &seta_vregs                },    // Coin Lockout + Video Registers
  455.     { 0x700400, 0x700fff, paletteram_xRRRRRGGGGGBBBBB_word_w, &paletteram    },    // Palette
  456.     { 0x701000, 0x7013ff, MWA_BANK13                            },    // ? Palette ?
  457.     { 0x800000, 0x801fff, seta_vram_0_w, &seta_vram_0            },    // VRAM 0
  458.     { 0x802000, 0x803fff, seta_vram_1_w, &seta_vram_1            },    // VRAM 1
  459.     { 0x880000, 0x881fff, seta_vram_2_w, &seta_vram_2            },    // VRAM 2
  460.     { 0x882000, 0x883fff, seta_vram_3_w, &seta_vram_3            },    // VRAM 3
  461.     { 0x900000, 0x900005, MWA_BANK6, &seta_vctrl_0                },    // VRAM 0&1 Ctrl
  462.     { 0x980000, 0x980005, MWA_BANK7, &seta_vctrl_2                },    // VRAM 2&3 Ctrl
  463.     { 0xa00000, 0xa00607, MWA_BANK8, &spriteram                    },    // Sprites Y
  464.     { 0xa80000, 0xa80001, MWA_BANK9                                },    // ? 0x4000
  465.     { 0xb00000, 0xb03fff, MWA_BANK10, &spriteram_2                },    // Sprites Code + X + Attr
  466.     { 0xc00000, 0xc03fff, seta_sound_word_w, &seta_sound_ram    },    // Sound
  467. //    { 0xd00000, 0xd00007, MWA_NOP                                },    // ?
  468.     { 0xe00000, 0xe00001, MWA_NOP                                },    // ?
  469.     { 0xf00000, 0xf00001, MWA_NOP                                },    // ?
  470.     { -1 }
  471. };
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479. /***************************************************************************
  480.  
  481.  
  482.                                     Sub CPU
  483.  
  484.  
  485. ***************************************************************************/
  486.  
  487. static WRITE_HANDLER( sub_bankswitch_w )
  488. {
  489.     unsigned char *RAM = memory_region(REGION_CPU2);
  490.     int bank = data >> 4;
  491.  
  492.     coin_lockout_w(0, ((~data) >> 2) & 1 );
  493.     coin_lockout_w(1, ((~data) >> 3) & 1 );
  494.  
  495.     cpu_setbank(15, &RAM[bank*0x4000 + 0xc000]);
  496.  
  497. #if 0
  498. {
  499.     char buf[80];
  500.     sprintf(buf,"%02X",    data&0xff );
  501.     usrintf_showmessage(buf);
  502. }
  503. #endif
  504. }
  505.  
  506.  
  507. /***************************************************************************
  508.                                 DownTown
  509. ***************************************************************************/
  510.  
  511. READ_HANDLER( downtown_ip_r )
  512. {
  513.     int dir1 = readinputport(4);    // analog port
  514.     int dir2 = readinputport(5);    // analog port
  515.  
  516.     dir1 = (~ (0x800 >> ((dir1 * 12)/0x100)) ) & 0xfff;
  517.     dir2 = (~ (0x800 >> ((dir2 * 12)/0x100)) ) & 0xfff;
  518.  
  519.     switch (offset)
  520.     {
  521.         case 0:    // upper 4 bits of p1 rotation + coins
  522.             return (readinputport(2) & 0xf0) + (dir1>>8);
  523.  
  524.         case 1:    // lower 8 bits of p1 rotation
  525.             return (dir1&0xff);
  526.  
  527.         case 2:    // p1
  528.                 return readinputport(0);
  529.  
  530.         case 3:    return 0xff;    //?
  531.  
  532.         case 4:    // upper 4 bits of p2 rotation + ?
  533.                 return (dir2>>8);
  534.  
  535.         case 5:    // lower 8 bits of p2 rotation
  536.                 return (dir2&0xff);
  537.  
  538.         case 6:    // p2
  539.             return readinputport(1);
  540.  
  541.         case 7:    return 0xff;    //?
  542.     }
  543.     return 0;
  544. }
  545.  
  546. static struct MemoryReadAddress downtown_sub_readmem[] =
  547. {
  548.     { 0x0000, 0x01ff, MRA_RAM            },    // RAM
  549.     { 0x0800, 0x0800, soundlatch_r        },    //
  550.     { 0x0801, 0x0801, soundlatch2_r        },    //
  551.     { 0x1000, 0x1007, downtown_ip_r        },    // Input Ports
  552.     { 0x5000, 0x57ff, MRA_RAM            },    // Shared RAM
  553.     { 0x7000, 0x7fff, MRA_ROM            },    // ROM
  554.     { 0x8000, 0xbfff, MRA_BANK15        },    // Banked ROM
  555.     { 0xc000, 0xffff, MRA_ROM            },    // ROM
  556.     { -1 }
  557. };
  558.  
  559. static struct MemoryWriteAddress downtown_sub_writemem[] =
  560. {
  561.     { 0x0000, 0x01ff, MWA_RAM                },    // RAM
  562.     { 0x1000, 0x1000, sub_bankswitch_w        },    // ROM Bank + Coin Lockout
  563.     { 0x5000, 0x57ff, MWA_RAM, &sharedram    },    // Shared RAM
  564.     { 0x7000, 0xffff, MWA_ROM                },    // ROM
  565.     { -1 }
  566. };
  567.  
  568.  
  569.  
  570.  
  571. /***************************************************************************
  572.                                 Meta Fox
  573. ***************************************************************************/
  574.  
  575. static struct MemoryReadAddress metafox_sub_readmem[] =
  576. {
  577.     { 0x0000, 0x01ff, MRA_RAM            },    // RAM
  578.     { 0x0800, 0x0800, soundlatch_r        },    //
  579.     { 0x0801, 0x0801, soundlatch2_r        },    //
  580.     { 0x1000, 0x1000, input_port_2_r    },    // Coins
  581.     { 0x1002, 0x1002, input_port_0_r    },    // P1
  582. //    { 0x1004, 0x1004, MRA_NOP            },    // ?
  583.     { 0x1006, 0x1006, input_port_1_r    },    // P2
  584.     { 0x5000, 0x57ff, MRA_RAM            },    // Shared RAM
  585.     { 0x7000, 0x7fff, MRA_ROM            },    // ROM
  586.     { 0xc000, 0xffff, MRA_ROM            },    // ROM
  587.     { -1 }
  588. };
  589.  
  590. static struct MemoryWriteAddress metafox_sub_writemem[] =
  591. {
  592.     { 0x0000, 0x01ff, MWA_RAM                },    // RAM
  593.     { 0x1000, 0x1000, sub_bankswitch_w        },    // ROM Bank + Coin Lockout
  594.     { 0x5000, 0x57ff, MWA_RAM, &sharedram    },    // Shared RAM
  595.     { 0x7000, 0x7fff, MWA_ROM                },    // ROM
  596.     { 0x8000, 0xbfff, MWA_ROM                },    // ROM
  597.     { 0xc000, 0xffff, MWA_ROM                },    // ROM
  598.     { -1 }
  599. };
  600.  
  601.  
  602. /***************************************************************************
  603.                                 Twin Eagle
  604. ***************************************************************************/
  605.  
  606. static struct MemoryReadAddress twineagl_sub_readmem[] =
  607. {
  608.     { 0x0000, 0x01ff, MRA_RAM            },    // RAM
  609.     { 0x0800, 0x0800, soundlatch_r        },    //
  610.     { 0x0801, 0x0801, soundlatch2_r        },    //
  611.     { 0x1000, 0x1000, input_port_0_r    },    // P1
  612.     { 0x1001, 0x1001, input_port_1_r    },    // P2
  613.     { 0x1002, 0x1002, input_port_2_r    },    // Coins
  614.     { 0x5000, 0x57ff, MRA_RAM            },    // Shared RAM
  615.     { 0x7000, 0x7fff, MRA_ROM            },    // ROM
  616.     { 0x8000, 0xbfff, MRA_BANK15        },    // ROM
  617.     { 0xc000, 0xffff, MRA_ROM            },    // ROM
  618.     { -1 }
  619. };
  620.  
  621. static struct MemoryWriteAddress twineagl_sub_writemem[] =
  622. {
  623.     { 0x0000, 0x01ff, MWA_RAM                },    // RAM
  624.     { 0x1000, 0x1000, sub_bankswitch_w        },    // ROM Bank + Coin Lockout
  625.     { 0x5000, 0x57ff, MWA_RAM, &sharedram    },    // Shared RAM
  626.     { 0x7000, 0x7fff, MWA_ROM                },    // ROM
  627.     { 0xc000, 0xffff, MWA_ROM                },    // ROM
  628.     { -1 }
  629. };
  630.  
  631.  
  632.  
  633. /***************************************************************************
  634.                                 Thundercade
  635. ***************************************************************************/
  636.  
  637. static READ_HANDLER( ff_r )    {return 0xff;}
  638.  
  639. static struct MemoryReadAddress tndrcade_sub_readmem[] =
  640. {
  641.     { 0x0000, 0x01ff, MRA_RAM                    },    // RAM
  642.     { 0x0800, 0x0800, ff_r                        },    // ? (bits 0/1/2/3: 1 -> do test 0-ff/100-1e0/5001-57ff/banked rom)
  643. //    { 0x0800, 0x0800, soundlatch_r                },    //
  644. //    { 0x0801, 0x0801, soundlatch2_r                },    //
  645.     { 0x1000, 0x1000, input_port_0_r            },    // P1
  646.     { 0x1001, 0x1001, input_port_1_r            },    // P2
  647.     { 0x1002, 0x1002, input_port_2_r            },    // Coins
  648.     { 0x2001, 0x2001, AY8910_read_port_0_r        },
  649.     { 0x5000, 0x57ff, MRA_RAM                    },    // Shared RAM
  650.     { 0x6000, 0x7fff, MRA_ROM                    },    // ROM
  651.     { 0x8000, 0xbfff, MRA_BANK15                },    // Banked ROM
  652.     { 0xc000, 0xffff, MRA_ROM                    },    // ROM
  653.     { -1 }
  654. };
  655.  
  656. static struct MemoryWriteAddress tndrcade_sub_writemem[] =
  657. {
  658.     { 0x0000, 0x01ff, MWA_RAM                    },    // RAM
  659.     { 0x1000, 0x1000, sub_bankswitch_w            },    // ROM Bank + Coin Lockout
  660.     { 0x2000, 0x2000, AY8910_control_port_0_w    },
  661.     { 0x2001, 0x2001, AY8910_write_port_0_w        },
  662. //    { 0x3000, 0x3000, AY8910_control_port_1_w    },
  663. //    { 0x3001, 0x3001, AY8910_write_port_1_w        },
  664.     { 0x3000, 0x3001, MWA_NOP        },
  665.     { 0x5000, 0x57ff, MWA_RAM, &sharedram        },    // Shared RAM
  666.     { 0x6000, 0x7fff, MWA_ROM                    },    // ROM
  667.     { 0x8000, 0xbfff, MWA_ROM                    },    // Banked ROM
  668.     { 0xc000, 0xffff, MWA_ROM                    },    // ROM
  669.     { -1 }
  670. };
  671.  
  672.  
  673.  
  674. /***************************************************************************
  675.                                 U.S. Classic
  676. ***************************************************************************/
  677.  
  678. static struct MemoryReadAddress usclssic_sub_readmem[] =
  679. {
  680.     { 0x0000, 0x01ff, MRA_RAM            },    // RAM
  681.     { 0x1000, 0x107f, seta_sound_r        },    // Sound
  682.     { 0x1a00, 0x1fff, MRA_RAM            },    // RAM?
  683.     { 0x4000, 0x4000, soundlatch_r        },    // Sound Latch
  684.     { 0x8000, 0xbfff, MRA_BANK15        },    // Banked ROM
  685.     { 0xc000, 0xffff, MRA_ROM            },    // ROM
  686.     { -1 }
  687. };
  688.  
  689. static struct MemoryWriteAddress usclssic_sub_writemem[] =
  690. {
  691.     { 0x0000, 0x01ff, MWA_RAM            },    // RAM
  692.     { 0x0200, 0x0fff, MWA_RAM            },    // RAM
  693.     { 0x1000, 0x107f, seta_sound_w, &seta_sound_ram        },    // Sound
  694.     { 0x1200, 0x19ff, MWA_RAM            },    // RAM?
  695.     { 0x1a00, 0x1fff, MWA_RAM            },    // RAM?
  696.     { 0x4000, 0x4000, sub_bankswitch_w    },    //
  697.     { 0x8000, 0xbfff, MWA_ROM            },    // Banked ROM
  698.     { 0xc000, 0xffff, MWA_ROM            },    // ROM
  699.     { -1 }
  700. };
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710. /***************************************************************************
  711.  
  712.  
  713.                                 Input Ports
  714.  
  715.  
  716. ***************************************************************************/
  717.  
  718. #define    JOY_TYPE1_2BUTTONS(_n_) \
  719.     PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT        |    IPF_PLAYER##_n_    ) \
  720.     PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT    |    IPF_PLAYER##_n_    ) \
  721.     PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP        |    IPF_PLAYER##_n_    ) \
  722.     PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN        |    IPF_PLAYER##_n_    ) \
  723.     PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_BUTTON1            |    IPF_PLAYER##_n_    ) \
  724.     PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_BUTTON2            |    IPF_PLAYER##_n_    ) \
  725.     PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN                                ) \
  726.     PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_START##_n_                            )
  727.  
  728. #define    JOY_TYPE1_3BUTTONS(_n_) \
  729.     PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT        |    IPF_PLAYER##_n_    ) \
  730.     PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT    |    IPF_PLAYER##_n_    ) \
  731.     PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_UP        |    IPF_PLAYER##_n_    ) \
  732.     PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN        |    IPF_PLAYER##_n_    ) \
  733.     PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_BUTTON1            |    IPF_PLAYER##_n_    ) \
  734.     PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_BUTTON2            |    IPF_PLAYER##_n_    ) \
  735.     PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_BUTTON3            |    IPF_PLAYER##_n_    ) \
  736.     PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_START##_n_                            )
  737.  
  738.  
  739.  
  740. #define    JOY_TYPE2_2BUTTONS(_n_) \
  741.     PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP        |    IPF_PLAYER##_n_    ) \
  742.     PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN        |    IPF_PLAYER##_n_    ) \
  743.     PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT        |    IPF_PLAYER##_n_    ) \
  744.     PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT    |    IPF_PLAYER##_n_    ) \
  745.     PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_BUTTON1            |    IPF_PLAYER##_n_    ) \
  746.     PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_BUTTON2            |    IPF_PLAYER##_n_    ) \
  747.     PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN                                ) \
  748.     PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_START##_n_                            )
  749.  
  750. #define    JOY_TYPE2_3BUTTONS(_n_) \
  751.     PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_JOYSTICK_UP        |    IPF_PLAYER##_n_    ) \
  752.     PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN        |    IPF_PLAYER##_n_    ) \
  753.     PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT        |    IPF_PLAYER##_n_    ) \
  754.     PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT    |    IPF_PLAYER##_n_    ) \
  755.     PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_BUTTON1            |    IPF_PLAYER##_n_    ) \
  756.     PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_BUTTON2            |    IPF_PLAYER##_n_    ) \
  757.     PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_BUTTON3            |    IPF_PLAYER##_n_    ) \
  758.     PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_START##_n_                            )
  759.  
  760.  
  761. #define JOY_ROTATION(_n_, _left_, _right_ ) \
  762.     PORT_ANALOGX( 0xff, 0x00, IPT_DIAL | IPF_PLAYER##_n_, 15, 15, 0, 0, KEYCODE_##_left_, KEYCODE_##_right_, 0, 0 )
  763.  
  764.  
  765.  
  766. /***************************************************************************
  767.                                 Arbalester
  768. ***************************************************************************/
  769.  
  770. INPUT_PORTS_START( arbalest )
  771.  
  772.     PORT_START    // IN0 - Player 1
  773.     JOY_TYPE2_2BUTTONS(1)
  774.  
  775.     PORT_START    // IN1 - Player 2
  776.     JOY_TYPE2_2BUTTONS(2)
  777.  
  778.     PORT_START    // IN2 - Coins
  779.     PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  780.     PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  781.     PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  782.     PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  783.     PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_TILT     )
  784.     PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 )
  785.     PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_COIN2    )
  786.     PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_COIN1    )
  787.  
  788.     PORT_START    // IN3 - 2 DSWs - $600001 & 3.b
  789.     PORT_DIPNAME( 0x4001, 0x4001, "Licensed To" )
  790.     PORT_DIPSETTING(      0x0001, "Jordan" )
  791.     PORT_DIPSETTING(      0x4000, "Romstar" )
  792.     PORT_DIPSETTING(      0x4001, "Romstar" )
  793.     PORT_DIPSETTING(      0x0000, "Taito" )
  794.     PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) )
  795.     PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
  796.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  797.     PORT_SERVICE( 0x0004, IP_ACTIVE_LOW )
  798.     PORT_DIPNAME( 0x0008, 0x0008, "Unknown 2-4" )    // not used, according to manual
  799.     PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
  800.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  801.     PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) )
  802.     PORT_DIPSETTING(      0x0010, DEF_STR( 2C_1C ) )
  803.     PORT_DIPSETTING(      0x0030, DEF_STR( 1C_1C ) )
  804.     PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
  805.     PORT_DIPSETTING(      0x0020, DEF_STR( 1C_2C ) )
  806.     PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) )
  807.     PORT_DIPSETTING(      0x0040, DEF_STR( 2C_1C ) )
  808.     PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_1C ) )
  809.     PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
  810.     PORT_DIPSETTING(      0x0080, DEF_STR( 1C_2C ) )
  811.  
  812.     PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Difficulty ) )
  813.     PORT_DIPSETTING(      0x0300, "Easy" )
  814.     PORT_DIPSETTING(      0x0200, "Hard" )
  815.     PORT_DIPSETTING(      0x0100, "Harder" )
  816.     PORT_DIPSETTING(      0x0000, "Hardest" )
  817.     PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Bonus_Life ) )
  818.     PORT_DIPSETTING(      0x0c00, "Never" )
  819.     PORT_DIPSETTING(      0x0800, "300k Only" )
  820.     PORT_DIPSETTING(      0x0400, "600k Only" )
  821.     PORT_DIPSETTING(      0x0000, "300k & 600k" )
  822.     PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Lives ) )
  823.     PORT_DIPSETTING(      0x1000, "1" )
  824.     PORT_DIPSETTING(      0x0000, "2" )
  825.     PORT_DIPSETTING(      0x3000, "3" )
  826.     PORT_DIPSETTING(      0x2000, "5" )
  827. //    PORT_DIPNAME( 0x4000, 0x4000, "License" )
  828.     PORT_DIPNAME( 0x8000, 0x8000, "Coinage Type" )    // not supported
  829.     PORT_DIPSETTING(      0x8000, "1" )
  830.     PORT_DIPSETTING(      0x0000, "2" )
  831.  
  832. INPUT_PORTS_END
  833.  
  834.  
  835.  
  836. /***************************************************************************
  837.                                 Caliber 50
  838. TO BE DONE
  839. ***************************************************************************/
  840.  
  841. INPUT_PORTS_START( calibr50 )
  842.  
  843.     PORT_START    // IN0 - Player 1
  844.         JOY_TYPE2_2BUTTONS(1)
  845.  
  846.     PORT_START    // IN1 - Player 2
  847.         JOY_TYPE2_2BUTTONS(2)
  848.  
  849.     PORT_START    // IN2 - Coins
  850.         PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  851.         PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  852.         PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  853.         PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  854.         PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_TILT     )
  855.         PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 )
  856.         PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_COIN2    )
  857.         PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_COIN1    )
  858.  
  859.     PORT_START    // IN3 - 2 DSWs - $600001 & 3.b
  860.     PORT_DIPNAME( 0x0001, 0x0001, "Unknown 1-0" )
  861.     PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
  862.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  863.     PORT_DIPNAME( 0x0002, 0x0002, "Unknown 1-1" )
  864.     PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
  865.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  866.     PORT_DIPNAME( 0x0004, 0x0004, "Unknown 1-2" )
  867.     PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
  868.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  869.     PORT_DIPNAME( 0x0008, 0x0008, "Unknown 1-3" )
  870.     PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
  871.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  872.     PORT_DIPNAME( 0x0010, 0x0010, "Unknown 1-4" )
  873.     PORT_DIPSETTING(      0x0010, DEF_STR( Off ) )
  874.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  875.     PORT_DIPNAME( 0x0020, 0x0020, "Unknown 1-5" )
  876.     PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
  877.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  878.     PORT_DIPNAME( 0x0040, 0x0040, "Unknown 1-6" )
  879.     PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
  880.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  881.     PORT_DIPNAME( 0x0080, 0x0080, "Unknown 1-7" )
  882.     PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
  883.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  884.  
  885.     PORT_DIPNAME( 0x0100, 0x0100, "Unknown 2-0" )
  886.     PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
  887.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  888.     PORT_DIPNAME( 0x0200, 0x0200, "Unknown 2-1" )
  889.     PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
  890.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  891.     PORT_DIPNAME( 0x0400, 0x0400, "Unknown 2-2" )
  892.     PORT_DIPSETTING(      0x0400, DEF_STR( Off ) )
  893.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  894.     PORT_DIPNAME( 0x0800, 0x0800, "Unknown 2-3" )
  895.     PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
  896.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  897.     PORT_DIPNAME( 0x1000, 0x1000, "Unknown 2-4" )
  898.     PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
  899.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  900.     PORT_DIPNAME( 0x2000, 0x2000, "Unknown 2-5" )
  901.     PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
  902.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  903.     PORT_DIPNAME( 0x4000, 0x4000, "Unknown 2-6" )
  904.     PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
  905.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  906.     PORT_DIPNAME( 0x8000, 0x8000, "Unknown 2-7" )
  907.     PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
  908.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  909.  
  910.     PORT_START    // IN4 - Rotation Player 1
  911.         JOY_ROTATION(1, Z, X)
  912.  
  913.     PORT_START    // IN5 - Rotation Player 2
  914.         JOY_ROTATION(1, N, M)
  915.  
  916. INPUT_PORTS_END
  917.  
  918.  
  919.  
  920.  
  921.  
  922.  
  923. /***************************************************************************
  924.                                 DownTown
  925. ***************************************************************************/
  926.  
  927. INPUT_PORTS_START( downtown )
  928.  
  929.     PORT_START    // IN0 - Player 1
  930.     JOY_TYPE2_2BUTTONS(1)
  931.  
  932.     PORT_START    // IN1 - Player 2
  933.     JOY_TYPE2_2BUTTONS(2)
  934.  
  935.     PORT_START    // IN2 - Coins
  936.     PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  937.     PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  938.     PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  939.     PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  940.     PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_TILT     )
  941.     PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 )
  942.     PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_COIN2    )
  943.     PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_COIN1    )
  944.  
  945.     PORT_START    // IN3 - 2 DSWs - $600001 & 3.b
  946.     PORT_DIPNAME( 0x0001, 0x0000, "Sales" )
  947.     PORT_DIPSETTING(      0x0001, "Japan Only" )
  948.     PORT_DIPSETTING(      0x0000, "World" )
  949.     PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) )
  950.     PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
  951.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  952.     PORT_SERVICE( 0x0004, IP_ACTIVE_LOW )
  953.     PORT_DIPNAME( 0x0008, 0x0000, DEF_STR( Demo_Sounds ) )
  954.     PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
  955.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  956.     PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) )
  957.     PORT_DIPSETTING(      0x0010, DEF_STR( 2C_1C ) )
  958.     PORT_DIPSETTING(      0x0030, DEF_STR( 1C_1C ) )
  959.     PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
  960.     PORT_DIPSETTING(      0x0020, DEF_STR( 1C_2C ) )
  961.     PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) )
  962.     PORT_DIPSETTING(      0x0040, DEF_STR( 2C_1C ) )
  963.     PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_1C ) )
  964.     PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
  965.     PORT_DIPSETTING(      0x0080, DEF_STR( 1C_2C ) )
  966. // other coinage
  967. #if 0
  968.     PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) )
  969.     PORT_DIPSETTING(      0x0000, DEF_STR( 4C_1C ) )
  970.     PORT_DIPSETTING(      0x0010, DEF_STR( 3C_1C ) )
  971.     PORT_DIPSETTING(      0x0020, DEF_STR( 2C_1C ) )
  972.     PORT_DIPSETTING(      0x0030, DEF_STR( 1C_1C ) )
  973.     PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) )
  974.     PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_2C ) )
  975.     PORT_DIPSETTING(      0x0080, DEF_STR( 1C_3C ) )
  976.     PORT_DIPSETTING(      0x0040, DEF_STR( 1C_4C ) )
  977.     PORT_DIPSETTING(      0x0000, DEF_STR( 1C_6C ) )
  978. #endif
  979.  
  980.     PORT_DIPNAME( 0x0300, 0x0300, "Unknown 2-0&1" )
  981.     PORT_DIPSETTING(      0x0200, "2" )
  982.     PORT_DIPSETTING(      0x0300, "3" )
  983.     PORT_DIPSETTING(      0x0100, "4" )
  984.     PORT_DIPSETTING(      0x0000, "5" )
  985.     PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Bonus_Life ) )
  986.     PORT_DIPSETTING(      0x0c00, "Never" )
  987.     PORT_DIPSETTING(      0x0800, "50K Only" )
  988.     PORT_DIPSETTING(      0x0400, "100K Only" )
  989.     PORT_DIPSETTING(      0x0000, "50K, Every 150K" )
  990.     PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Lives ) )
  991.     PORT_DIPSETTING(      0x1000, "2" )
  992.     PORT_DIPSETTING(      0x3000, "3" )
  993.     PORT_DIPSETTING(      0x0000, "4" )
  994.     PORT_DIPSETTING(      0x2000, "5" )
  995.     PORT_DIPNAME( 0x4000, 0x4000, "World License" )
  996.     PORT_DIPSETTING(      0x4000, "Romstar" )
  997.     PORT_DIPSETTING(      0x0000, "Taito" )
  998.     PORT_DIPNAME( 0x8000, 0x8000, "Coinage Type" )    // not supported
  999.     PORT_DIPSETTING(      0x8000, "1" )
  1000.     PORT_DIPSETTING(      0x0000, "2" )
  1001.  
  1002.     PORT_START    // IN4 - Rotation Player 1
  1003.     JOY_ROTATION(1, Z, X)
  1004.  
  1005.     PORT_START    // IN5 - Rotation Player 2
  1006.     JOY_ROTATION(1, N, M)
  1007.  
  1008.  
  1009. INPUT_PORTS_END
  1010.  
  1011.  
  1012.  
  1013. /***************************************************************************
  1014.                                 Meta Fox
  1015. ***************************************************************************/
  1016.  
  1017. INPUT_PORTS_START( metafox )
  1018.  
  1019.     PORT_START    // IN0
  1020.     JOY_TYPE2_2BUTTONS(1)
  1021.  
  1022.     PORT_START    // IN1
  1023.     JOY_TYPE2_2BUTTONS(2)
  1024.  
  1025.     PORT_START    // IN2
  1026.     PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1027.     PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1028.     PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1029.     PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1030.     PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_TILT     )
  1031.     PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_SERVICE1 )
  1032.     PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_COIN2    )
  1033.     PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_COIN1    )
  1034.  
  1035.     PORT_START    // IN3 - 2 DSWs - $600001 & 3.b
  1036.     PORT_DIPNAME( 0x4001, 0x4001, "Licensed To"    )
  1037.     PORT_DIPSETTING(      0x0001, "Jordan"        )
  1038.     PORT_DIPSETTING(      0x4001, "Romstar"       )
  1039.     PORT_DIPSETTING(      0x4000, "Taito"         )
  1040.     PORT_DIPSETTING(      0x0000, "Taito America" )
  1041.     PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) )
  1042.     PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
  1043.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1044.     PORT_SERVICE( 0x0004, IP_ACTIVE_LOW )
  1045.     PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Demo_Sounds ) )
  1046.     PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
  1047.     PORT_DIPSETTING(      0x0008, DEF_STR( On ) )
  1048.     PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) )
  1049.     PORT_DIPSETTING(      0x0010, DEF_STR( 2C_1C ) )
  1050.     PORT_DIPSETTING(      0x0030, DEF_STR( 1C_1C ) )
  1051.     PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
  1052.     PORT_DIPSETTING(      0x0020, DEF_STR( 1C_2C ) )
  1053.     PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) )
  1054.     PORT_DIPSETTING(      0x0040, DEF_STR( 2C_1C ) )
  1055.     PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_1C ) )
  1056.     PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
  1057.     PORT_DIPSETTING(      0x0080, DEF_STR( 1C_2C ) )
  1058.  
  1059.     PORT_DIPNAME( 0x0100, 0x0100, "Unknown 2-0" )
  1060.     PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
  1061.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1062.     PORT_DIPNAME( 0x0200, 0x0200, "Unknown 2-1" )
  1063.     PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
  1064.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1065.     PORT_DIPNAME( 0x0400, 0x0400, "Unknown 2-2" )
  1066.     PORT_DIPSETTING(      0x0400, DEF_STR( Off ) )
  1067.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1068.     PORT_DIPNAME( 0x0800, 0x0800, "Unknown 2-3" )
  1069.     PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
  1070.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1071.     PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Lives ) )
  1072.     PORT_DIPSETTING(      0x1000, "1" )
  1073.     PORT_DIPSETTING(      0x0000, "2" )
  1074.     PORT_DIPSETTING(      0x3000, "3" )
  1075.     PORT_DIPSETTING(      0x2000, "5" )
  1076. //    PORT_DIPNAME( 0x4000, 0x4000, "License" )
  1077.     PORT_DIPNAME( 0x8000, 0x8000, "Coinage Type" )    // not supported
  1078.     PORT_DIPSETTING(      0x8000, "1" )
  1079.     PORT_DIPSETTING(      0x0000, "2" )
  1080.  
  1081.  
  1082. INPUT_PORTS_END
  1083.  
  1084.  
  1085.  
  1086.  
  1087. /***************************************************************************
  1088.                             Mobile Suit Gundam
  1089. ***************************************************************************/
  1090.  
  1091.  
  1092. INPUT_PORTS_START( msgundam )
  1093.  
  1094.     PORT_START    // IN0 - Player 1 - $400000.w
  1095.     JOY_TYPE2_2BUTTONS(1)
  1096.  
  1097.     PORT_START    // IN1 - Player 2 - $400002.w
  1098.     JOY_TYPE2_2BUTTONS(2)
  1099.  
  1100.     PORT_START    // IN2 - Coins - $400004.w
  1101.     PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_COIN1       )
  1102.     PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_COIN2    )
  1103.     PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
  1104.     PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_TILT     )
  1105.     PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1106.     PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1107.     PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1108.     PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1109.  
  1110.     PORT_START    // IN3 - 2 DSWs - $600001 & 3.b
  1111.     PORT_DIPNAME( 0x0007, 0x0007, DEF_STR( Coin_A ) )
  1112.     PORT_DIPSETTING(      0x0000, DEF_STR( 4C_1C ) )
  1113.     PORT_DIPSETTING(      0x0001, DEF_STR( 3C_1C ) )
  1114.     PORT_DIPSETTING(      0x0002, DEF_STR( 2C_1C ) )
  1115.     PORT_DIPSETTING(      0x0007, DEF_STR( 1C_1C ) )
  1116.     PORT_DIPSETTING(      0x0006, DEF_STR( 1C_2C ) )
  1117.     PORT_DIPSETTING(      0x0005, DEF_STR( 1C_3C ) )
  1118.     PORT_DIPSETTING(      0x0003, DEF_STR( 1C_4C ) )
  1119.     PORT_DIPSETTING(      0x0004, DEF_STR( 1C_5C ) )
  1120.     PORT_DIPNAME( 0x0038, 0x0038, DEF_STR( Coin_B ) )
  1121.     PORT_DIPSETTING(      0x0000, DEF_STR( 4C_1C ) )
  1122.     PORT_DIPSETTING(      0x0008, DEF_STR( 3C_1C ) )
  1123.     PORT_DIPSETTING(      0x0010, DEF_STR( 2C_1C ) )
  1124.     PORT_DIPSETTING(      0x0038, DEF_STR( 1C_1C ) )
  1125.     PORT_DIPSETTING(      0x0030, DEF_STR( 1C_2C ) )
  1126.     PORT_DIPSETTING(      0x0028, DEF_STR( 1C_3C ) )
  1127.     PORT_DIPSETTING(      0x0018, DEF_STR( 1C_4C ) )
  1128.     PORT_DIPSETTING(      0x0020, DEF_STR( 1C_5C ) )
  1129.     PORT_DIPNAME( 0x0040, 0x0040, "Unknown 2-6" )
  1130.     PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
  1131.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1132.     PORT_DIPNAME( 0x0080, 0x0080, DEF_STR( Free_Play ) )
  1133.     PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
  1134.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1135.  
  1136.     PORT_DIPNAME( 0x0100, 0x0100, "Unknown 1-0" )    // demo sound??
  1137.     PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
  1138.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1139.     PORT_DIPNAME( 0x0200, 0x0200, "Unknown 1-1" )
  1140.     PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
  1141.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1142.     PORT_DIPNAME( 0x0400, 0x0400, "Unknown 1-2" )
  1143.     PORT_DIPSETTING(      0x0400, DEF_STR( Off ) )
  1144.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1145.     PORT_DIPNAME( 0x0800, 0x0800, "Unknown 1-3" )
  1146.     PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
  1147.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1148.     PORT_DIPNAME( 0x1000, 0x1000, DEF_STR( Flip_Screen ) )
  1149.     PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
  1150.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1151.     PORT_DIPNAME( 0x2000, 0x2000, "Memory Check?" )
  1152.     PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
  1153.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1154.     PORT_DIPNAME( 0x4000, 0x4000, "Unknown 1-6" )
  1155.     PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
  1156.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1157.     PORT_SERVICE( 0x8000, IP_ACTIVE_LOW )
  1158.  
  1159. INPUT_PORTS_END
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165. /***************************************************************************
  1166.                                 Thundercade
  1167. ***************************************************************************/
  1168.  
  1169. INPUT_PORTS_START( tndrcade )
  1170.  
  1171.     PORT_START    // IN0 - Player 1
  1172.     JOY_TYPE1_2BUTTONS(1)
  1173.  
  1174.     PORT_START    // IN1 - Player 2
  1175.     JOY_TYPE1_2BUTTONS(2)
  1176.  
  1177.     PORT_START    // IN2 - Coins
  1178.     PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_COIN1    )
  1179.     PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_COIN2    )
  1180.     PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_START1   )
  1181.     PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_START2   )
  1182.     PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 )
  1183.     PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_TILT     )
  1184.     PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1185.     PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1186.  
  1187.     PORT_START    // IN3 - 2 DSWs - $600001 & 3.b
  1188.     PORT_DIPNAME( 0x0003, 0x0003, "Difficulty?" )
  1189.     PORT_DIPSETTING(      0x0002, "0" )
  1190.     PORT_DIPSETTING(      0x0003, "1" )
  1191.     PORT_DIPSETTING(      0x0001, "2" )
  1192.     PORT_DIPSETTING(      0x0000, "3" )
  1193.     PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Bonus_Life ) )
  1194.     PORT_DIPSETTING(      0x0008, "10K Only" )
  1195.     PORT_DIPSETTING(      0x000c, "50K Only" )
  1196.     PORT_DIPSETTING(      0x0004, "50K, Every 150K" )
  1197.     PORT_DIPSETTING(      0x0004, "70K, Every 200K" )
  1198.     PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Lives ) )
  1199.     PORT_DIPSETTING(      0x0010, "1" )
  1200.     PORT_DIPSETTING(      0x0000, "2" )
  1201.     PORT_DIPSETTING(      0x0030, "3" )
  1202.     PORT_DIPSETTING(      0x0020, "5" )
  1203.     PORT_DIPNAME( 0x0040, 0x0040, "Unknown 2-6*" )
  1204.     PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
  1205.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1206.     PORT_DIPNAME( 0x0080, 0x0080, "Unknown 2-7*" )
  1207.     PORT_DIPSETTING(      0x0080, DEF_STR( Off ) )
  1208.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1209.  
  1210.     PORT_DIPNAME( 0x0100, 0x0100, "Title" )
  1211.     PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
  1212.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1213.     PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Flip_Screen ) )
  1214.     PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
  1215.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1216.     PORT_SERVICE( 0x0400, IP_ACTIVE_LOW )
  1217.     PORT_DIPNAME( 0x0800, 0x0000, DEF_STR( Demo_Sounds ) )
  1218.     PORT_DIPSETTING(      0x0800, DEF_STR( Off ) )
  1219.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1220.     PORT_DIPNAME( 0x1000, 0x1000, "Unknown 1-4" )
  1221.     PORT_DIPSETTING(      0x1000, DEF_STR( Off ) )
  1222.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1223.     PORT_DIPNAME( 0x2000, 0x2000, "Unknown 1-5*" )    // if on use 1-7
  1224.     PORT_DIPSETTING(      0x2000, DEF_STR( Off ) )
  1225.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1226.     PORT_DIPNAME( 0x4000, 0x4000, "Unknown 1-6" )
  1227.     PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
  1228.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1229.     PORT_DIPNAME( 0x8000, 0x8000, "Unknown 1-7*" )
  1230.     PORT_DIPSETTING(      0x8000, DEF_STR( Off ) )
  1231.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1232.  
  1233. INPUT_PORTS_END
  1234.  
  1235.  
  1236.  
  1237. /***************************************************************************
  1238.                                 Twin Eagle
  1239. ***************************************************************************/
  1240.  
  1241. INPUT_PORTS_START( twineagl )
  1242.  
  1243.     PORT_START    // IN0 - Player 1
  1244.     JOY_TYPE1_2BUTTONS(1)
  1245.  
  1246.     PORT_START    // IN1 - Player 2
  1247.     JOY_TYPE1_2BUTTONS(2)
  1248.  
  1249.     PORT_START    // IN2 - Coins
  1250.     PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_COIN1    )
  1251.     PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_COIN2    )
  1252.     PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_START1   )
  1253.     PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_START2   )
  1254.     PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_SERVICE1 )
  1255.     PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_TILT     )
  1256.     PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1257.     PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1258.  
  1259.     PORT_START    // IN3 - 2 DSWs - $600001 & 3.b
  1260.     PORT_DIPNAME( 0x0001, 0x0001, "Unknown 1-0*" )    // this is merged with 2-6!
  1261.     PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
  1262.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1263.     PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Flip_Screen ) )
  1264.     PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
  1265.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1266.     PORT_SERVICE( 0x0004, IP_ACTIVE_LOW )
  1267.     PORT_DIPNAME( 0x0008, 0x0008, DEF_STR( Cabinet ) )
  1268.     PORT_DIPSETTING(      0x0000, DEF_STR( Upright ) )
  1269.     PORT_DIPSETTING(      0x0008, DEF_STR( Cocktail ) )
  1270.     PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) )
  1271.     PORT_DIPSETTING(      0x0010, DEF_STR( 2C_1C ) )
  1272.     PORT_DIPSETTING(      0x0030, DEF_STR( 1C_1C ) )
  1273.     PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
  1274.     PORT_DIPSETTING(      0x0020, DEF_STR( 1C_2C ) )
  1275.     PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) )
  1276.     PORT_DIPSETTING(      0x0040, DEF_STR( 2C_1C ) )
  1277.     PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_1C ) )
  1278.     PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
  1279.     PORT_DIPSETTING(      0x0080, DEF_STR( 1C_2C ) )
  1280.  
  1281.     PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) )
  1282.     PORT_DIPSETTING(      0x0200, "1" )
  1283.     PORT_DIPSETTING(      0x0300, "3" )
  1284.     PORT_DIPSETTING(      0x0100, "5" )
  1285.     PORT_DIPSETTING(      0x0000, "7" )
  1286.     PORT_DIPNAME( 0x0c00, 0x0c00, DEF_STR( Bonus_Life ) )
  1287.     PORT_DIPSETTING(      0x0c00, "Never" )
  1288.     PORT_DIPSETTING(      0x0800, "500K Only" )
  1289.     PORT_DIPSETTING(      0x0400, "1000K Only" )
  1290.     PORT_DIPSETTING(      0x0000, "500K, Every 1500K" )
  1291.     PORT_DIPNAME( 0x3000, 0x3000, DEF_STR( Lives ) )
  1292.     PORT_DIPSETTING(      0x3000, "2" )
  1293.     PORT_DIPSETTING(      0x2000, "4" )
  1294.     PORT_DIPSETTING(      0x1000, "0" )
  1295.     PORT_DIPSETTING(      0x0000, "1" )
  1296.     PORT_DIPNAME( 0x4000, 0x4000, "Unknown 2-6*" )
  1297.     PORT_DIPSETTING(      0x4000, DEF_STR( Off ) )
  1298.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1299.     PORT_DIPNAME( 0x8000, 0x8000, "Coinage Type" )    // not supported
  1300.     PORT_DIPSETTING(      0x8000, "1" )
  1301.     PORT_DIPSETTING(      0x0000, "2" )
  1302.  
  1303. INPUT_PORTS_END
  1304.  
  1305.  
  1306.  
  1307.  
  1308. /***************************************************************************
  1309.                                 U.S. Classic
  1310. ***************************************************************************/
  1311.  
  1312. INPUT_PORTS_START( usclssic )
  1313.  
  1314. #define TRACKBALL(_dir_) \
  1315.     PORT_ANALOG( 0x0fff, 0x0000, IPT_TRACKBALL_##_dir_ | IPF_CENTER, 70, 30, 0, 0 )
  1316.  
  1317.     PORT_START    // IN0
  1318.     TRACKBALL(X)
  1319.     PORT_BIT   ( 0x1000, IP_ACTIVE_LOW,  IPT_UNKNOWN )
  1320.     PORT_BIT   ( 0x2000, IP_ACTIVE_LOW,  IPT_UNKNOWN )
  1321.     PORT_BIT   ( 0x4000, IP_ACTIVE_LOW,  IPT_UNKNOWN )
  1322.     PORT_BIT   ( 0x8000, IP_ACTIVE_LOW,  IPT_UNKNOWN )
  1323.  
  1324.     PORT_START    // IN1
  1325.     TRACKBALL(Y)
  1326.     PORT_BIT   ( 0x1000, IP_ACTIVE_LOW,  IPT_UNKNOWN )
  1327.     PORT_BIT   ( 0x2000, IP_ACTIVE_HIGH, IPT_BUTTON1 )
  1328.     PORT_BIT   ( 0x4000, IP_ACTIVE_HIGH, IPT_START1  )
  1329.     PORT_BIT   ( 0x8000, IP_ACTIVE_LOW,  IPT_UNKNOWN )
  1330.  
  1331.     PORT_START    // IN2
  1332.     PORT_BIT(  0x0001, IP_ACTIVE_LOW,  IPT_UNKNOWN  )    // tested (sound related?)
  1333.     PORT_BIT(  0x0002, IP_ACTIVE_LOW,  IPT_UNKNOWN  )
  1334.     PORT_BIT(  0x0004, IP_ACTIVE_LOW,  IPT_UNKNOWN  )
  1335.     PORT_BIT(  0x0008, IP_ACTIVE_LOW,  IPT_UNKNOWN  )
  1336.     PORT_BIT(  0x0010, IP_ACTIVE_HIGH, IPT_COIN1    )
  1337.     PORT_BIT(  0x0020, IP_ACTIVE_HIGH, IPT_COIN2    )
  1338.     PORT_BIT(  0x0040, IP_ACTIVE_HIGH, IPT_SERVICE1 )
  1339.     PORT_BIT(  0x0080, IP_ACTIVE_HIGH, IPT_TILT     )
  1340.  
  1341.     PORT_START    // IN3 - 2 DSWs - $600001 & 3.b
  1342.     PORT_DIPNAME( 0x0001, 0x0001, "Credits For 9-Hole" )
  1343.     PORT_DIPSETTING(      0x0001, "2" )
  1344.     PORT_DIPSETTING(      0x0000, "3" )
  1345.     PORT_DIPNAME( 0x0002, 0x0002, "Unknown 1-1" )
  1346.     PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
  1347.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1348.     PORT_DIPNAME( 0x000c, 0x000c, DEF_STR( Lives ) )
  1349.     PORT_DIPSETTING(      0x0004, "1" )
  1350.     PORT_DIPSETTING(      0x0008, "2" )
  1351.     PORT_DIPSETTING(      0x000c, "3" )
  1352.     PORT_DIPSETTING(      0x0000, "4" )
  1353.     PORT_DIPNAME( 0x0030, 0x0030, DEF_STR( Coin_A ) )
  1354.     PORT_DIPSETTING(      0x0010, DEF_STR( 2C_1C ) )
  1355.     PORT_DIPSETTING(      0x0030, DEF_STR( 1C_1C ) )
  1356.     PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
  1357.     PORT_DIPSETTING(      0x0020, DEF_STR( 1C_2C ) )
  1358.     PORT_DIPNAME( 0x00c0, 0x00c0, DEF_STR( Coin_B ) )
  1359.     PORT_DIPSETTING(      0x0040, DEF_STR( 2C_1C ) )
  1360.     PORT_DIPSETTING(      0x00c0, DEF_STR( 1C_1C ) )
  1361.     PORT_DIPSETTING(      0x0000, DEF_STR( 2C_3C ) )
  1362.     PORT_DIPSETTING(      0x0080, DEF_STR( 1C_2C ) )
  1363.  
  1364.     PORT_DIPNAME( 0x0100, 0x0100, "Unknown 2-0" )
  1365.     PORT_DIPSETTING(      0x0100, DEF_STR( Off ) )
  1366.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1367.     PORT_DIPNAME( 0x0200, 0x0200, DEF_STR( Flip_Screen ) )
  1368.     PORT_DIPSETTING(      0x0200, DEF_STR( Off ) )
  1369.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1370.     PORT_SERVICE( 0x0400, IP_ACTIVE_LOW )
  1371.     PORT_DIPNAME( 0x3800, 0x3800, "Unknown 2-3&4&5" )
  1372.     PORT_DIPSETTING(      0x3800, "7" )
  1373.     PORT_DIPSETTING(      0x3000, "6" )
  1374.     PORT_DIPSETTING(      0x2800, "5" )
  1375.     PORT_DIPSETTING(      0x2000, "4" )
  1376.     PORT_DIPSETTING(      0x1800, "3" )
  1377.     PORT_DIPSETTING(      0x1000, "2" )
  1378.     PORT_DIPSETTING(      0x0800, "1" )
  1379.     PORT_DIPSETTING(      0x0000, "0" )
  1380.     PORT_DIPNAME( 0xc000, 0xc000, "Licensed To"     )
  1381.     PORT_DIPSETTING(      0xc000, "Romstar"       )
  1382.     PORT_DIPSETTING(      0x8000, "None (Japan)"  )
  1383.     PORT_DIPSETTING(      0x4000, "Taito"         )
  1384.     PORT_DIPSETTING(      0x0000, "Taito America" )
  1385.  
  1386. INPUT_PORTS_END
  1387.  
  1388.  
  1389.  
  1390.  
  1391. /***************************************************************************
  1392.                                 Zing Zing Zip
  1393. ***************************************************************************/
  1394.  
  1395. INPUT_PORTS_START( zingzip )
  1396.  
  1397.     PORT_START    // IN0 - Player 1 - $400000.w
  1398.     JOY_TYPE1_2BUTTONS(1)
  1399.  
  1400.     PORT_START    // IN1 - Player 2 - $400002.w
  1401.     JOY_TYPE1_2BUTTONS(2)
  1402.  
  1403.     PORT_START    // IN2 - Coins - $400004.w
  1404.     PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_COIN1       )
  1405.     PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_UNKNOWN  ) // no coin 2
  1406.     PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
  1407.     PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_TILT     )
  1408.     PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1409.     PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1410.     PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1411.     PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1412.  
  1413.     PORT_START    // IN3 - 2 DSWs - $600001 & 3.b
  1414.     PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) )
  1415.     PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
  1416.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1417.     PORT_DIPNAME( 0x0002, 0x0002, DEF_STR( Demo_Sounds ) )
  1418.     PORT_DIPSETTING(      0x0000, DEF_STR( Off ) )
  1419.     PORT_DIPSETTING(      0x0002, DEF_STR( On ) )
  1420.     PORT_DIPNAME( 0x0004, 0x0004, "Unknown 1-2" )    // remaining switches seem unused
  1421.     PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
  1422.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1423.     PORT_DIPNAME( 0x0008, 0x0008, "Unknown 1-3" )
  1424.     PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
  1425.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1426.     PORT_DIPNAME( 0x0010, 0x0010, "Unknown 1-4" )
  1427.     PORT_DIPSETTING(      0x0010, DEF_STR( Off ) )
  1428.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1429.     PORT_DIPNAME( 0x0020, 0x0020, "Unknown 1-5" )
  1430.     PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
  1431.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1432.     PORT_DIPNAME( 0x0040, 0x0040, "Unknown 1-6" )
  1433.     PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
  1434.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1435.     PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
  1436.  
  1437.     PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) )
  1438.     PORT_DIPSETTING(      0x0200, "2" )
  1439.     PORT_DIPSETTING(      0x0300, "3" )
  1440.     PORT_DIPSETTING(      0x0100, "4" )
  1441.     PORT_DIPSETTING(      0x0000, "5" )
  1442.     PORT_DIPNAME( 0x0c00, 0x0c00, "Unknown 2-2&3" )
  1443.     PORT_DIPSETTING(      0x0800, "01" )
  1444.     PORT_DIPSETTING(      0x0c00, "08" )
  1445.     PORT_DIPSETTING(      0x0400, "10" )
  1446.     PORT_DIPSETTING(      0x0000, "18" )
  1447.     PORT_DIPNAME( 0xf000, 0xf000, DEF_STR( Coinage ) )
  1448.     PORT_DIPSETTING(      0xa000, DEF_STR( 6C_1C ) )
  1449.     PORT_DIPSETTING(      0xb000, DEF_STR( 5C_1C ) )
  1450.     PORT_DIPSETTING(      0xc000, DEF_STR( 4C_1C ) )
  1451.     PORT_DIPSETTING(      0xd000, DEF_STR( 3C_1C ) )
  1452.     PORT_DIPSETTING(      0x1000, DEF_STR( 8C_3C ) )
  1453.     PORT_DIPSETTING(      0xe000, DEF_STR( 2C_1C ) )
  1454.     PORT_DIPSETTING(      0x2000, DEF_STR( 5C_3C ) )
  1455.     PORT_DIPSETTING(      0x3000, DEF_STR( 3C_2C ) )
  1456.     PORT_DIPSETTING(      0xf000, DEF_STR( 1C_1C ) )
  1457.     PORT_DIPSETTING(      0x4000, DEF_STR( 2C_3C ) )
  1458.     PORT_DIPSETTING(      0x9000, DEF_STR( 1C_2C ) )
  1459.     PORT_DIPSETTING(      0x8000, DEF_STR( 1C_3C ) )
  1460.     PORT_DIPSETTING(      0x7000, DEF_STR( 1C_4C ) )
  1461.     PORT_DIPSETTING(      0x6000, DEF_STR( 1C_5C ) )
  1462.     PORT_DIPSETTING(      0x5000, DEF_STR( 1C_6C ) )
  1463.     PORT_DIPSETTING(      0x0000, DEF_STR( Free_Play ) )
  1464.  
  1465. INPUT_PORTS_END
  1466.  
  1467.  
  1468.  
  1469. /***************************************************************************
  1470.                                 War of Aero
  1471. ***************************************************************************/
  1472.  
  1473. INPUT_PORTS_START( wrofaero )
  1474.  
  1475.     PORT_START    // IN0 - Player 1 - $400000.w
  1476.     JOY_TYPE1_3BUTTONS(1)    // 3rd button selects the weapon
  1477.                             // when the dsw for cheating is on
  1478.  
  1479.     PORT_START    // IN1 - Player 2 - $400002.w
  1480.     JOY_TYPE1_3BUTTONS(2)
  1481.  
  1482.     PORT_START    // IN2 - Coins - $400004.w
  1483.     PORT_BIT(  0x0001, IP_ACTIVE_LOW, IPT_COIN1       )
  1484.     PORT_BIT(  0x0002, IP_ACTIVE_LOW, IPT_COIN2    )
  1485.     PORT_BIT(  0x0004, IP_ACTIVE_LOW, IPT_SERVICE1 )
  1486.     PORT_BIT(  0x0008, IP_ACTIVE_LOW, IPT_TILT     )
  1487.     PORT_BIT(  0x0010, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1488.     PORT_BIT(  0x0020, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1489.     PORT_BIT(  0x0040, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1490.     PORT_BIT(  0x0080, IP_ACTIVE_LOW, IPT_UNKNOWN  )
  1491.  
  1492.     PORT_START    // IN3 - 2 DSWs - $600001 & 3.b
  1493.     PORT_DIPNAME( 0x0001, 0x0001, DEF_STR( Flip_Screen ) )
  1494.     PORT_DIPSETTING(      0x0001, DEF_STR( Off ) )
  1495.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1496.     PORT_DIPNAME( 0x0002, 0x0002, "Unknown 1-1*" )    // tested
  1497.     PORT_DIPSETTING(      0x0002, DEF_STR( Off ) )
  1498.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1499.     PORT_DIPNAME( 0x0004, 0x0004, "Unknown 1-2*" )    // tested
  1500.     PORT_DIPSETTING(      0x0004, DEF_STR( Off ) )
  1501.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1502.     PORT_BITX(    0x0008, 0x0008, IPT_DIPSWITCH_NAME | IPF_CHEAT, "Stage & Weapon Select", IP_KEY_NONE, IP_JOY_NONE )    // P2 Start Is Freeze Screen...
  1503.     PORT_DIPSETTING(      0x0008, DEF_STR( Off ) )
  1504.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1505.     PORT_DIPNAME( 0x0010, 0x0010, "Unknown 1-4" )
  1506.     PORT_DIPSETTING(      0x0010, DEF_STR( Off ) )
  1507.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1508.     PORT_DIPNAME( 0x0020, 0x0020, "Unknown 1-5" )
  1509.     PORT_DIPSETTING(      0x0020, DEF_STR( Off ) )
  1510.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1511.     PORT_DIPNAME( 0x0040, 0x0040, "Unknown 1-6" )
  1512.     PORT_DIPSETTING(      0x0040, DEF_STR( Off ) )
  1513.     PORT_DIPSETTING(      0x0000, DEF_STR( On ) )
  1514.     PORT_SERVICE( 0x0080, IP_ACTIVE_LOW )
  1515.  
  1516.     PORT_DIPNAME( 0x0300, 0x0300, DEF_STR( Lives ) )
  1517.     PORT_DIPSETTING(      0x0200, "2" )
  1518.     PORT_DIPSETTING(      0x0300, "3" )
  1519.     PORT_DIPSETTING(      0x0100, "4" )
  1520.     PORT_DIPSETTING(      0x0000, "5" )
  1521.     PORT_DIPNAME( 0x0c00, 0x0c00, "Unknown 2-2&3" )
  1522.     PORT_DIPSETTING(      0x0800, "0" )
  1523.     PORT_DIPSETTING(      0x0c00, "1" )
  1524.     PORT_DIPSETTING(      0x0400, "2" )
  1525.     PORT_DIPSETTING(      0x0000, "3" )
  1526.     PORT_DIPNAME( 0xf000, 0xf000, DEF_STR( Coinage ) )
  1527.     PORT_DIPSETTING(      0xa000, DEF_STR( 6C_1C ) )
  1528.     PORT_DIPSETTING(      0xb000, DEF_STR( 5C_1C ) )
  1529.     PORT_DIPSETTING(      0xc000, DEF_STR( 4C_1C ) )
  1530.     PORT_DIPSETTING(      0xd000, DEF_STR( 3C_1C ) )
  1531.     PORT_DIPSETTING(      0x1000, DEF_STR( 8C_3C ) )
  1532.     PORT_DIPSETTING(      0xe000, DEF_STR( 2C_1C ) )
  1533.     PORT_DIPSETTING(      0x2000, DEF_STR( 5C_3C ) )
  1534.     PORT_DIPSETTING(      0x3000, DEF_STR( 3C_2C ) )
  1535.     PORT_DIPSETTING(      0xf000, DEF_STR( 1C_1C ) )
  1536.     PORT_DIPSETTING(      0x4000, DEF_STR( 2C_3C ) )
  1537.     PORT_DIPSETTING(      0x9000, DEF_STR( 1C_2C ) )
  1538.     PORT_DIPSETTING(      0x8000, DEF_STR( 1C_3C ) )
  1539.     PORT_DIPSETTING(      0x7000, DEF_STR( 1C_4C ) )
  1540.     PORT_DIPSETTING(      0x6000, DEF_STR( 1C_5C ) )
  1541.     PORT_DIPSETTING(      0x5000, DEF_STR( 1C_6C ) )
  1542.     PORT_DIPSETTING(      0x0000, DEF_STR( Free_Play ) )
  1543.  
  1544.  
  1545. INPUT_PORTS_END
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554. /***************************************************************************
  1555.  
  1556.  
  1557.                                 Graphics Layouts
  1558.  
  1559. Sprites and layers use 16x16 tile, made of four 8x8 tiles. They can be 4
  1560. or 6 planes deep and are stored in a wealth of formats.
  1561.  
  1562. ***************************************************************************/
  1563.  
  1564.                         /* First the 4 bit tiles */
  1565.  
  1566.  
  1567. /* The bitplanes are packed togheter */
  1568. static struct GfxLayout layout_packed =
  1569. {
  1570.     16,16,
  1571.     RGN_FRAC(1,1),
  1572.     4,
  1573.     {2*4,3*4,0*4,1*4},
  1574.     {256+128,256+129,256+130,256+131, 256+0,256+1,256+2,256+3,
  1575.      128,129,130,131, 0,1,2,3},
  1576.     {0*16,1*16,2*16,3*16,4*16,5*16,6*16,7*16,
  1577.      32*16,33*16,34*16,35*16,36*16,37*16,38*16,39*16},
  1578.     16*16*4
  1579. };
  1580.  
  1581.  
  1582. /* The bitplanes are separated */
  1583. static struct GfxLayout layout_planes =
  1584. {
  1585.     16,16,
  1586.     RGN_FRAC(1,4),
  1587.     4,
  1588.     { RGN_FRAC(3,4), RGN_FRAC(2,4), RGN_FRAC(1,4), RGN_FRAC(0,4) },
  1589.     {0,1,2,3,4,5,6,7, 64,65,66,67,68,69,70,71},
  1590.     {0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8,
  1591.      16*8,17*8,18*8,19*8,20*8,21*8,22*8,23*8 },
  1592.     16*16*1
  1593. };
  1594.  
  1595.  
  1596. /* The bitplanes are separated (but there are 2 per rom) */
  1597. static struct GfxLayout layout_planes_2roms =
  1598. {
  1599.     16,16,
  1600.     RGN_FRAC(1,2),
  1601.     4,
  1602.     {RGN_FRAC(1,2)+8, RGN_FRAC(1,2)+0, 8, 0},
  1603.     {0,1,2,3,4,5,6,7, 128,129,130,131,132,133,134,135},
  1604.     {0*16,1*16,2*16,3*16,4*16,5*16,6*16,7*16,
  1605.      16*16,17*16,18*16,19*16,20*16,21*16,22*16,23*16 },
  1606.     16*16*2
  1607. };
  1608.  
  1609.  
  1610. /* The bitplanes are separated (but there are 2 per rom).
  1611.    Each 8x8 tile is additionally split in 2 vertical halves four bits wide,
  1612.    stored one after the other */
  1613. static struct GfxLayout layout_planes_2roms_split =
  1614. {
  1615.     16,16,
  1616.     RGN_FRAC(1,2),
  1617.     4,
  1618.     {0,4, RGN_FRAC(1,2)+0,RGN_FRAC(1,2)+4},
  1619.     {128+64,128+65,128+66,128+67, 128+0,128+1,128+2,128+3,
  1620.      8*8+0,8*8+1,8*8+2,8*8+3, 0,1,2,3},
  1621.     {0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8,
  1622.      32*8,33*8,34*8,35*8,36*8,37*8,38*8,39*8},
  1623.     16*16*2
  1624. };
  1625.  
  1626.  
  1627.  
  1628.  
  1629.                         /* Then the 6 bit tiles */
  1630.  
  1631.  
  1632. /* The bitplanes are packed together: 3 roms with 2 bits in each */
  1633. static struct GfxLayout layout_packed_6bits_3roms =
  1634. {
  1635.     16,16,
  1636.     RGN_FRAC(1,3),
  1637.     6,
  1638.     {RGN_FRAC(0,3)+0,RGN_FRAC(0,3)+4,  RGN_FRAC(1,3)+0,RGN_FRAC(1,3)+4,  RGN_FRAC(2,3)+0,RGN_FRAC(2,3)+4},
  1639.     {128+64,128+65,128+66,128+67, 128+0,128+1,128+2,128+3,
  1640.      64,65,66,67, 0,1,2,3},
  1641.     {0*8,1*8,2*8,3*8,4*8,5*8,6*8,7*8,
  1642.      32*8,33*8,34*8,35*8,36*8,37*8,38*8,39*8},
  1643.     16*16*2
  1644. };
  1645.  
  1646.  
  1647. /* The bitplanes are packed togheter: 4 bits in one rom, 2 bits in another.
  1648.    Since there isn't simmetry between the two roms, we load the latter with
  1649.    ROM_LOAD_GFX_EVEN. This way we can think of it as a 4 planes rom, with the
  1650.    upper 2 planes unused.     */
  1651.  
  1652. static struct GfxLayout layout_packed_6bits_2roms =
  1653. {
  1654.     16,16,
  1655.     RGN_FRAC(6,8),    // use 6 of the "8 planes"
  1656.     6,
  1657.     {RGN_FRAC(4,8), RGN_FRAC(4,8)+1*4, 2*4,3*4,0*4,1*4},
  1658.     {256+128,256+129,256+130,256+131, 256+0,256+1,256+2,256+3,
  1659.      128,129,130,131, 0,1,2,3},
  1660.     {0*16,1*16,2*16,3*16,4*16,5*16,6*16,7*16,
  1661.      32*16,33*16,34*16,35*16,36*16,37*16,38*16,39*16},
  1662.     16*16*4
  1663. };
  1664.  
  1665.  
  1666.  
  1667. /***************************************************************************
  1668.                                 DownTown
  1669. ***************************************************************************/
  1670.  
  1671. static struct GfxDecodeInfo downtown_gfxdecodeinfo[] =
  1672. {
  1673.     { REGION_GFX1, 0, &layout_planes,             512*0, 32 }, // [0] Sprites
  1674.     { REGION_GFX2, 0, &layout_planes_2roms_split, 512*0, 32 }, // [1] Layer 1
  1675.     { -1 }
  1676. };
  1677.  
  1678. /***************************************************************************
  1679.                             Mobile Suit Gundam
  1680. ***************************************************************************/
  1681.  
  1682. static struct GfxDecodeInfo msgundam_gfxdecodeinfo[] =
  1683. {
  1684.     { REGION_GFX1, 0, &layout_planes_2roms, 512*0, 32 }, // [0] Sprites
  1685.     { REGION_GFX2, 0, &layout_packed,       512*2, 32 }, // [1] Layer 1
  1686.     { REGION_GFX3, 0, &layout_packed,       512*1, 32 }, // [2] Layer 2
  1687.     { -1 }
  1688. };
  1689.  
  1690. /***************************************************************************
  1691.                                 Thundercade
  1692. ***************************************************************************/
  1693.  
  1694. static struct GfxDecodeInfo tndrcade_gfxdecodeinfo[] =
  1695. {
  1696.     /* Only sprites, layout unknown since the roms have yet to be dumped */
  1697.     { REGION_GFX1, 0, &layout_planes,             512*0, 32 }, // [0] Sprites
  1698.     { -1 }
  1699. };
  1700.  
  1701. /***************************************************************************
  1702.                                 U.S. Classic
  1703. ***************************************************************************/
  1704.  
  1705. /* 6 bit layer. The colors are still WRONG.
  1706.    Remeber there's a vh_init_palette */
  1707.  
  1708. static struct GfxDecodeInfo usclssic_gfxdecodeinfo[] =
  1709. {
  1710.     { REGION_GFX1, 0, &layout_planes,             512*0+256, 32/2 }, // [0] Sprites
  1711.     { REGION_GFX2, 0, &layout_packed_6bits_3roms, 512*1, 32 }, // [1] Layer 1
  1712.     { -1 }
  1713. };
  1714.  
  1715. /***************************************************************************
  1716.                                 Zing Zing Zip
  1717. ***************************************************************************/
  1718.  
  1719. static struct GfxDecodeInfo zingzip_gfxdecodeinfo[] =
  1720. {
  1721.     { REGION_GFX1, 0, &layout_planes_2roms,       512*0, 32 }, // [0] Sprites
  1722.     { REGION_GFX2, 0, &layout_packed_6bits_2roms, 512*2, 32 }, // [1] Layer 1
  1723.     { REGION_GFX3, 0, &layout_packed,             512*1, 32 }, // [2] Layer 2
  1724.     { -1 }
  1725. };
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736. /***************************************************************************
  1737.  
  1738.                                 Machine drivers
  1739.  
  1740. ***************************************************************************/
  1741.  
  1742. #define SETA_INTERRUPTS_NUM 1
  1743.  
  1744. static int seta_interrupt_1_and_2(void)
  1745. {
  1746.     switch (cpu_getiloops())
  1747.     {
  1748.         case 0:        return 1;
  1749.         case 1:        return 2;
  1750.         default:    return ignore_interrupt();
  1751.     }
  1752. }
  1753.  
  1754. static int seta_interrupt_2_and_4(void)
  1755. {
  1756.     switch (cpu_getiloops())
  1757.     {
  1758.         case 0:        return 2;
  1759.         case 1:        return 4;
  1760.         default:    return ignore_interrupt();
  1761.     }
  1762. }
  1763.  
  1764.  
  1765. #define SETA_SUB_INTERRUPTS_NUM 2
  1766.  
  1767. static int seta_sub_interrupt(void)
  1768. {
  1769.     switch (cpu_getiloops())
  1770.     {
  1771.         case 0:        return nmi_interrupt();
  1772.         case 1:        return interrupt();
  1773.         default:    return ignore_interrupt();
  1774.     }
  1775. }
  1776.  
  1777.  
  1778. /***************************************************************************
  1779.                                 DownTown
  1780. ***************************************************************************/
  1781.  
  1782. /* downtown lev 3 = lev 2 + lev 1 ! */
  1783.  
  1784. static struct MachineDriver machine_driver_downtown =
  1785. {
  1786.     {
  1787.         {
  1788.             CPU_M68000,
  1789.             8000000,
  1790.             downtown_readmem, downtown_writemem,0,0,
  1791.             m68_level3_irq, 1
  1792.         },
  1793.         {
  1794.             CPU_M65C02,
  1795.             1000000,    /* ?? */
  1796.             downtown_sub_readmem, downtown_sub_writemem,0,0,
  1797.             seta_sub_interrupt, SETA_SUB_INTERRUPTS_NUM
  1798.         },
  1799.     },
  1800.     60,DEFAULT_60HZ_VBLANK_DURATION,
  1801.     1,
  1802.     0,
  1803.  
  1804.     /* video hardware */
  1805.     400, 256, { 16, 400-1, 0, 256-16-1 },
  1806.     downtown_gfxdecodeinfo,
  1807.     512, 512,
  1808.     0,
  1809.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  1810.     0,
  1811.     seta_vh_start_1_layer,
  1812.     0,
  1813.     seta_vh_screenrefresh,
  1814.  
  1815.     /* sound hardware */
  1816.     0,0,0,0,
  1817.     {
  1818.         {
  1819.             SOUND_CUSTOM,
  1820.             &seta_4KHz_interface
  1821.         }
  1822.     }
  1823. };
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829. /***************************************************************************
  1830.                                 Meta Fox
  1831. ***************************************************************************/
  1832.  
  1833. /* metafox lev 3 = lev 2 + lev 1 ! */
  1834.  
  1835. static struct MachineDriver machine_driver_metafox =
  1836. {
  1837.     {
  1838.         {
  1839.             CPU_M68000,
  1840.             8000000,
  1841.             downtown_readmem, downtown_writemem,0,0,
  1842.             m68_level3_irq, 1
  1843.         },
  1844.         {
  1845.             CPU_M65C02,
  1846.             1000000,    /* ?? */
  1847.             metafox_sub_readmem, metafox_sub_writemem,0,0,
  1848.             seta_sub_interrupt, SETA_SUB_INTERRUPTS_NUM
  1849.         },
  1850.     },
  1851.     60,DEFAULT_60HZ_VBLANK_DURATION,
  1852.     1,
  1853.     0,
  1854.  
  1855.     /* video hardware */
  1856.     400, 256, { 16, 400-1, 0, 256-8-16-1 },
  1857.     downtown_gfxdecodeinfo,
  1858.     512, 512,
  1859.     0,
  1860.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  1861.     0,
  1862.     seta_vh_start_1_layer,
  1863.     0,
  1864.     seta_vh_screenrefresh,
  1865.  
  1866.     /* sound hardware */
  1867.     0,0,0,0,
  1868.     {
  1869.         {
  1870.             SOUND_CUSTOM,
  1871.             &seta_4KHz_interface
  1872.         }
  1873.     }
  1874. };
  1875.  
  1876.  
  1877.  
  1878. /***************************************************************************
  1879.                             Mobile Suit Gundam
  1880. ***************************************************************************/
  1881.  
  1882. /* msgundam lev 2 == lev 6 ! */
  1883.  
  1884. static struct MachineDriver machine_driver_msgundam =
  1885. {
  1886.     {
  1887.         {
  1888.             CPU_M68000,
  1889.             16000000,
  1890.             msgundam_readmem, msgundam_writemem,0,0,
  1891.             seta_interrupt_2_and_4, SETA_INTERRUPTS_NUM
  1892.         },
  1893.     },
  1894.     60,DEFAULT_60HZ_VBLANK_DURATION,
  1895.     1,
  1896.     0,
  1897.  
  1898.     /* video hardware */
  1899.     400, 256, { 16, 400-1, 0, 256-16-1 },
  1900.     msgundam_gfxdecodeinfo,
  1901.     512 * 3, 512 * 3,    /* sprites, layer2, layer1 */
  1902.     0,
  1903.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  1904.     0,
  1905.     seta_vh_start_2_layers,
  1906.     0,
  1907.     seta_vh_screenrefresh,
  1908.  
  1909.     /* sound hardware */
  1910.     0,0,0,0,
  1911.     {
  1912.         {
  1913.             SOUND_CUSTOM,
  1914.             &seta_6KHz_interface
  1915.         }
  1916.     }
  1917. };
  1918.  
  1919.  
  1920.  
  1921. /***************************************************************************
  1922.                                 Thundercade
  1923. ***************************************************************************/
  1924.  
  1925. static READ_HANDLER( dsw1_r )
  1926. {
  1927.     return (readinputport(3) >> 8) & 0xff;
  1928. }
  1929.  
  1930. static READ_HANDLER( dsw2_r )
  1931. {
  1932.     return (readinputport(3) >> 0) & 0xff;
  1933. }
  1934.  
  1935. /* It's not simply an 8910: much more than 16 registers are written */
  1936. static struct AY8910interface tndrcade_ay8910_interface =
  1937. {
  1938.     2,
  1939.     1000000,        /* ? */
  1940.     { MIXERG(30,MIXER_GAIN_2x,MIXER_PAN_CENTER), MIXERG(30,MIXER_GAIN_2x,MIXER_PAN_CENTER) },
  1941.     { dsw1_r, 0 },    /* input A: DSW 1 */
  1942.     { dsw2_r, 0 },    /* input B: DSW 2 */
  1943.     { 0, 0 },
  1944.     { 0, 0 }
  1945. };
  1946.  
  1947.  
  1948. static struct MachineDriver machine_driver_tndrcade =
  1949. {
  1950.     {
  1951.         {
  1952.             CPU_M68000,
  1953.             8000000,
  1954.             tndrcade_readmem, tndrcade_writemem,0,0,
  1955.             m68_level2_irq, 1
  1956.         },
  1957.         {
  1958.             CPU_M65C02,
  1959.             1000000,    /* ?? */
  1960.             tndrcade_sub_readmem, tndrcade_sub_writemem,0,0,
  1961.             seta_sub_interrupt, SETA_SUB_INTERRUPTS_NUM
  1962.         },
  1963.     },
  1964.     60,DEFAULT_60HZ_VBLANK_DURATION,
  1965.     1,
  1966.     0,
  1967.  
  1968.     /* video hardware */
  1969.     400, 256, { 16, 400-1, 0, 256-16-1 },
  1970.     tndrcade_gfxdecodeinfo,
  1971.     512, 512,    /* sprites only */
  1972.     0,
  1973.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  1974.     0,
  1975.     0,    /* no need for a vh_start: no tilemaps */
  1976.     0,
  1977.     seta_vh_screenrefresh_no_layers, /* just draw the sprites */
  1978.  
  1979.     /* sound hardware */
  1980.     0,0,0,0,
  1981.     {
  1982.         {
  1983.             SOUND_AY8910,
  1984.             &tndrcade_ay8910_interface
  1985.         },
  1986.     }
  1987. };
  1988.  
  1989.  
  1990.  
  1991. /***************************************************************************
  1992.                                 Twin Eagle
  1993. ***************************************************************************/
  1994.  
  1995. /* Just like metafox, but:
  1996.    the sub cpu reads the ip at different locations,
  1997.    the samples need a different playback rate,
  1998.    the visible area seems different. */
  1999.  
  2000. static struct MachineDriver machine_driver_twineagl =
  2001. {
  2002.     {
  2003.         {
  2004.             CPU_M68000,
  2005.             8000000,
  2006.             downtown_readmem, downtown_writemem,0,0,
  2007.             m68_level3_irq, 1
  2008.         },
  2009.         {
  2010.             CPU_M65C02,
  2011.             1000000,    /* ?? */
  2012.             twineagl_sub_readmem, twineagl_sub_writemem,0,0,
  2013.             seta_sub_interrupt, SETA_SUB_INTERRUPTS_NUM
  2014.         },
  2015.     },
  2016.     60,DEFAULT_60HZ_VBLANK_DURATION,
  2017.     1,
  2018.     0,
  2019.  
  2020.     /* video hardware */
  2021.     400, 256, { 16, 400-1, 0, 256-16-1 },
  2022.     downtown_gfxdecodeinfo,
  2023.     512, 512,
  2024.     0,
  2025.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  2026.     0,
  2027.     seta_vh_start_1_layer,
  2028.     0,
  2029.     seta_vh_screenrefresh,
  2030.  
  2031.     /* sound hardware */
  2032.     0,0,0,0,
  2033.     {
  2034.         {
  2035.             SOUND_CUSTOM,
  2036.             &seta_8KHz_interface
  2037.         }
  2038.     }
  2039. };
  2040.  
  2041.  
  2042. /***************************************************************************
  2043.                                 U.S. Classic
  2044. ***************************************************************************/
  2045.  
  2046.  
  2047. /*    usclssic lev 6 = lev 2+4 !
  2048.     Test mode shows a 16ms and 4ms counters. I wonder if every game has
  2049.     5 ints per frame
  2050. */
  2051.  
  2052. #define usclssic_INTERRUPTS_NUM (4+1)
  2053. int usclssic_interrupt(void)
  2054. {
  2055.     switch (cpu_getiloops())
  2056.     {
  2057.         case 0:        return 4;
  2058.         case 1:        return 4;
  2059.         case 2:        return 4;
  2060.         case 3:        return 4;
  2061.         case 4:        return 2;
  2062.         default:    return ignore_interrupt();
  2063.     }
  2064. }
  2065.  
  2066. static struct MachineDriver machine_driver_usclssic =
  2067. {
  2068.     {
  2069.         {
  2070.             CPU_M68000,
  2071.             8000000,
  2072.             usclssic_readmem, usclssic_writemem,0,0,
  2073.             usclssic_interrupt, usclssic_INTERRUPTS_NUM
  2074.         },
  2075.         {
  2076.             CPU_M65C02,
  2077.             1000000,    /* ?? */
  2078.             usclssic_sub_readmem, usclssic_sub_writemem,0,0,
  2079.             interrupt, 1    /* NMI caused by main cpu when writing to the sound latch */
  2080.         },
  2081.     },
  2082.     60,DEFAULT_60HZ_VBLANK_DURATION,
  2083.     1,
  2084.     0,
  2085.  
  2086.     /* video hardware */
  2087.     400, 256, { 16, 400-1, 0, 256-16-1 },
  2088.     usclssic_gfxdecodeinfo,
  2089.     16*32, 16*32 + 64*32,        /* sprites, layer */
  2090.     usclssic_vh_init_palette,    /* layer is 6 planes deep */
  2091.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  2092.     0,
  2093.     seta_vh_start_1_layer,
  2094.     0,
  2095.     seta_vh_screenrefresh,
  2096.  
  2097.     /* sound hardware */
  2098.     0,0,0,0,
  2099.     {
  2100.         {
  2101.             SOUND_CUSTOM,
  2102.             &seta_4KHz_interface
  2103.         }
  2104.     }
  2105. };
  2106.  
  2107.  
  2108.  
  2109.  
  2110.  
  2111. /***************************************************************************
  2112.                                 War of Aero
  2113. ***************************************************************************/
  2114.  
  2115. /* wrofaero lev 2 almost identical to lev 6, but there's an additional
  2116.    call in the latter (sound related?) */
  2117.  
  2118. static struct MachineDriver machine_driver_wrofaero =
  2119. {
  2120.     {
  2121.         {
  2122.             CPU_M68000,
  2123.             16000000,
  2124.             wrofaero_readmem, wrofaero_writemem,0,0,
  2125.             m68_level6_irq, 1
  2126.         },
  2127.     },
  2128.     60,DEFAULT_60HZ_VBLANK_DURATION,
  2129.     1,
  2130.     0,
  2131.  
  2132.     /* video hardware */
  2133.     400, 256, { 16, 400-1, 0, 256-16-1 },
  2134.     msgundam_gfxdecodeinfo,
  2135.     512 * 3, 512 * 3,    /* sprites, layer1, layer2 */
  2136.     0,
  2137.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  2138.     0,
  2139.     seta_vh_start_2_layers,
  2140.     0,
  2141.     seta_vh_screenrefresh,
  2142.  
  2143.     /* sound hardware */
  2144.     0,0,0,0,
  2145.     {
  2146.         {
  2147.             SOUND_CUSTOM,
  2148.             &seta_6KHz_interface
  2149.         }
  2150.     }
  2151. };
  2152.  
  2153.  
  2154.  
  2155.  
  2156. /***************************************************************************
  2157.                                 Zing Zing Zip
  2158. ***************************************************************************/
  2159.  
  2160. /* zingzip lev 3 = lev 2 + lev 1 !
  2161.    SR = 2100 -> lev1 is ignored so we must supply int 3, since the routine
  2162.    at int 1 is necessary: it plays the background music.
  2163.  */
  2164.  
  2165. static struct MachineDriver machine_driver_zingzip =
  2166. {
  2167.     {
  2168.         {
  2169.             CPU_M68000,
  2170.             16000000,
  2171.             wrofaero_readmem, wrofaero_writemem,0,0,
  2172.             m68_level3_irq, 1
  2173.         },
  2174.     },
  2175.     60,DEFAULT_60HZ_VBLANK_DURATION,
  2176.     1,
  2177.     0,
  2178.  
  2179.     /* video hardware */
  2180.     400, 256, { 16, 400-1, 0, 256-16-1 },
  2181.     zingzip_gfxdecodeinfo,
  2182.     16*32+16*32+16*32, 16*32+16*32+64*32,    /* sprites, layer2, layer1 */
  2183.     zingzip_vh_init_palette,                /* layer 1 gfx is 6 planes deep */
  2184.     VIDEO_TYPE_RASTER | VIDEO_MODIFIES_PALETTE,
  2185.     0,
  2186.     seta_vh_start_2_layers,
  2187.     0,
  2188.     seta_vh_screenrefresh,
  2189.  
  2190.     /* sound hardware */
  2191.     0,0,0,0,
  2192.     {
  2193.         {
  2194.             SOUND_CUSTOM,
  2195.             &seta_6KHz_interface
  2196.         }
  2197.     }
  2198. };
  2199.  
  2200.  
  2201.  
  2202.  
  2203.  
  2204. /***************************************************************************
  2205.  
  2206.  
  2207.                                 ROMs Loading
  2208.  
  2209.  
  2210. ***************************************************************************/
  2211.  
  2212.  
  2213.  
  2214.  
  2215. /***************************************************************************
  2216.  
  2217.                                 Arbalester
  2218.  
  2219. ***************************************************************************/
  2220.  
  2221. ROM_START( arbalest )
  2222.  
  2223.     ROM_REGION( 0x080000, REGION_CPU1 )        /* 68000 Code */
  2224.     ROM_LOAD_EVEN( "uk001.03",  0x000000, 0x040000, 0xee878a2c )
  2225.     ROM_LOAD_ODD(  "uk001.04",  0x000000, 0x040000, 0x902bb4e3 )
  2226.  
  2227.     ROM_REGION( 0x010000, REGION_CPU2 )        /* 65c02 Code */
  2228.     ROM_LOAD( "uk001.05", 0x006000, 0x002000, 0x0339fc53 )
  2229.     ROM_RELOAD(           0x008000, 0x002000  )
  2230.     ROM_RELOAD(           0x00a000, 0x002000  )
  2231.     ROM_RELOAD(           0x00c000, 0x002000  )
  2232.     ROM_RELOAD(           0x00e000, 0x002000  )
  2233.  
  2234.     ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* Sprites */
  2235.     ROM_LOAD( "uk001.06", 0x000000, 0x040000, 0x11c75746 )
  2236.     ROM_LOAD( "uk001.07", 0x040000, 0x040000, 0x01b166c7 )
  2237.     ROM_LOAD( "uk001.08", 0x080000, 0x040000, 0x78d60ba3 )
  2238.     ROM_LOAD( "uk001.09", 0x0c0000, 0x040000, 0xb4748ae0 )
  2239.  
  2240.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* Layer 1 */
  2241.     ROM_LOAD( "uk001.10", 0x000000, 0x080000, 0xc1e2f823 )
  2242.     ROM_LOAD( "uk001.11", 0x080000, 0x080000, 0x09dfe56a )
  2243.     ROM_LOAD( "uk001.12", 0x100000, 0x080000, 0x818a4085 )
  2244.     ROM_LOAD( "uk001.13", 0x180000, 0x080000, 0x771fa164 )
  2245.  
  2246.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* Samples */
  2247.     ROM_LOAD( "uk001.15", 0x000000, 0x080000, 0xce9df5dd )
  2248.     ROM_LOAD( "uk001.14", 0x080000, 0x080000, 0x016b844a )
  2249.  
  2250. ROM_END
  2251.  
  2252. READ_HANDLER( arbalest_protection_r )
  2253. {
  2254.     return 0;
  2255. }
  2256.  
  2257. void init_arbalest(void)
  2258. {
  2259.     install_mem_read_handler(0, 0x80000, 0x8000f, arbalest_protection_r);
  2260. }
  2261.  
  2262.  
  2263.  
  2264.  
  2265. /***************************************************************************
  2266.  
  2267.                                 Caliber 50
  2268.  
  2269. CPU:   TMP 68000N-8, 65C02
  2270. Other: NEC D4701
  2271.  
  2272. ***************************************************************************/
  2273.  
  2274. ROM_START( calibr50 )
  2275.  
  2276.     ROM_REGION( 0x0a0000, REGION_CPU1 )        /* 68000 Code */
  2277.     ROM_LOAD_EVEN( "c50_001.rom", 0x000000, 0x040000, BADCRC(0x49730f92) )
  2278.     ROM_LOAD_ODD(  "c50_004.rom", 0x000000, 0x040000, BADCRC(0x91088d3b) )
  2279.     ROM_LOAD_EVEN( "c50_13.rom",  0x080000, 0x010000, 0x0d30d09f )
  2280.     ROM_LOAD_ODD(  "c50_12.rom",  0x080000, 0x010000, 0x7aecc3f9 )
  2281.  
  2282.     ROM_REGION( 0x04c000, REGION_CPU2 )        /* 65c02 Code */
  2283.     ROM_LOAD( "c50_005.rom", 0x004000, 0x040000, 0x4a54c085 )
  2284.     ROM_RELOAD(              0x00c000, 0x040000             )
  2285.  
  2286.     ROM_REGION( 0x200000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* Sprites */
  2287.     ROM_LOAD( "c50_006.rom", 0x000000, 0x080000, 0xfff52f91 )
  2288.     ROM_LOAD( "c50_007.rom", 0x080000, 0x080000, 0xb6c19f71 )
  2289.     ROM_LOAD( "c50_008.rom", 0x100000, 0x080000, 0x7aae07ef )
  2290.     ROM_LOAD( "c50_009.rom", 0x180000, 0x080000, 0xf85da2c5 )
  2291.  
  2292.     ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* Layer 1 */
  2293.     ROM_LOAD( "c50_010.rom", 0x000000, 0x080000, 0xf986577a )
  2294.     ROM_LOAD( "c50_011.rom", 0x080000, 0x080000, 0x08620052 )
  2295.  
  2296.     /* KHz? */
  2297.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* Samples */
  2298.     ROM_LOAD( "c50_012.rom", 0x000000, 0x080000, 0xbb996547 )
  2299.     ROM_LOAD( "c50_013.rom", 0x080000, 0x080000, 0x09ec0df6 )
  2300.  
  2301. ROM_END
  2302.  
  2303.  
  2304.  
  2305.  
  2306.  
  2307. /***************************************************************************
  2308.  
  2309.                                 DownTown
  2310.  
  2311. ***************************************************************************/
  2312.  
  2313. ROM_START( downtown )
  2314.  
  2315.     ROM_REGION( 0x0a0000, REGION_CPU1 )        /* 68000 Code */
  2316.     ROM_LOAD_EVEN( "ud2001.000", 0x000000, 0x040000, 0xf1965260 )
  2317.     ROM_LOAD_ODD(  "ud2001.003", 0x000000, 0x040000, 0xe7d5fa5f )
  2318.     ROM_LOAD_EVEN( "ud2000.002", 0x080000, 0x010000, 0xca976b24 )
  2319.     ROM_LOAD_ODD(  "ud2000.001", 0x080000, 0x010000, 0x1708aebd )
  2320.  
  2321.     ROM_REGION( 0x04c000, REGION_CPU2 )        /* 65c02 Code */
  2322.     ROM_LOAD( "ud2002.004", 0x004000, 0x040000, 0xbbd538b1 )
  2323.     ROM_RELOAD(             0x00c000, 0x040000             )
  2324.  
  2325.     ROM_REGION( 0x200000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* Sprites */
  2326.     ROM_LOAD( "ud2005.t01", 0x000000, 0x080000, 0x77e6d249 )
  2327.     ROM_LOAD( "ud2006.t02", 0x080000, 0x080000, 0x6e381bf2 )
  2328.     ROM_LOAD( "ud2007.t03", 0x100000, 0x080000, 0x737b4971 )
  2329.     ROM_LOAD( "ud2008.t04", 0x180000, 0x080000, 0x99b9d757 )
  2330.  
  2331.     ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* Layer 1 */
  2332.     ROM_LOAD( "ud2009.t05", 0x000000, 0x080000, 0xaee6c581 )
  2333.     ROM_LOAD( "ud2010.t06", 0x080000, 0x080000, 0x3d399d54 )
  2334.  
  2335.     /* 4KHz? */
  2336.     ROM_REGION( 0x080000, REGION_SOUND1 )    /* Samples */
  2337.     ROM_LOAD( "ud2011.t07", 0x000000, 0x080000, 0x9c9ff69f )
  2338.  
  2339. ROM_END
  2340.  
  2341.  
  2342. /* Protection. NVRAM is handled writing commands here */
  2343. unsigned char downtown_protection[0x200];
  2344. static READ_HANDLER( downtown_protection_r )
  2345. {
  2346.     int job = READ_WORD(&downtown_protection[0xf8]) & 0xff;
  2347.  
  2348.     switch (job)
  2349.     {
  2350.         case 0xa3:
  2351.         {
  2352.             char word[] = "WALTZ0";
  2353.             if (offset >= 0x100 && offset <= 0x10a)    return word[(offset-0x100)/2];
  2354.             else                                    return 0;
  2355.         }
  2356.         default:
  2357.             return READ_WORD(&downtown_protection[offset]) & 0xff;
  2358.     }
  2359. }
  2360. static WRITE_HANDLER( downtown_protection_w )
  2361. {
  2362.     COMBINE_WORD_MEM(&downtown_protection[offset], data);
  2363. }
  2364.  
  2365. void init_downtown(void)
  2366. {
  2367.     install_mem_read_handler (0, 0x200000, 0x2001ff, downtown_protection_r);
  2368.     install_mem_write_handler(0, 0x200000, 0x2001ff, downtown_protection_w);
  2369. }
  2370.  
  2371.  
  2372.  
  2373.  
  2374. /***************************************************************************
  2375.  
  2376.                                     Meta Fox
  2377.  
  2378. (Seta 1990)
  2379.  
  2380. P0-045A
  2381.  
  2382. P1-006-163                    8464   68000-8
  2383. P1-007-164    X1-002A X1-001A 8464
  2384. P1-008-165                    8464
  2385. P1-009-166                    8464     256K-12
  2386.                                        256K-12
  2387.  
  2388.                  X1-012
  2389.                  X1-011
  2390.  
  2391.  
  2392.    2063    X1-010     X1-006     X0-006
  2393.                       X1-007
  2394.                       X1-004     X1-004
  2395.  
  2396. ----------------------
  2397. P1-036-A
  2398.  
  2399. UP-001-010
  2400. UP-001-011
  2401. UP-001-012
  2402. UP-001-013
  2403.  
  2404.  
  2405. UP-001-014
  2406. UP-001-015
  2407.  
  2408. -----------------------
  2409. P1-049-A
  2410.  
  2411.               UP-001-001
  2412.               UP-001-002
  2413.               P1-003-161
  2414.               P1-004-162
  2415.  
  2416.  
  2417.               UP-001-005
  2418.               x
  2419.  
  2420. ***************************************************************************/
  2421.  
  2422. ROM_START( metafox )
  2423.  
  2424.     ROM_REGION( 0x0a0000, REGION_CPU1 )        /* 68000 Code */
  2425.     ROM_LOAD_EVEN( "p1003161", 0x000000, 0x040000, 0x4fd6e6a1 )
  2426.     ROM_LOAD_ODD(  "p1004162", 0x000000, 0x040000, 0xb6356c9a )
  2427.     ROM_LOAD_EVEN( "up001002", 0x080000, 0x010000, 0xce91c987 )
  2428.     ROM_LOAD_ODD(  "up001001", 0x080000, 0x010000, 0x0db7a505 )
  2429.  
  2430.     ROM_REGION( 0x010000, REGION_CPU2 )        /* 65c02 Code */
  2431.     ROM_LOAD( "up001005", 0x006000, 0x002000, 0x2ac5e3e3 )
  2432.     ROM_RELOAD(           0x008000, 0x002000  )
  2433.     ROM_RELOAD(           0x00a000, 0x002000  )
  2434.     ROM_RELOAD(           0x00c000, 0x002000  )
  2435.     ROM_RELOAD(           0x00e000, 0x002000  )
  2436.  
  2437.     ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* Sprites */
  2438.     ROM_LOAD( "p1006163", 0x000000, 0x040000, 0x80f69c7c )
  2439.     ROM_LOAD( "p1007164", 0x040000, 0x040000, 0xd137e1a3 )
  2440.     ROM_LOAD( "p1008165", 0x080000, 0x040000, 0x57494f2b )
  2441.     ROM_LOAD( "p1009166", 0x0c0000, 0x040000, 0x8344afd2 )
  2442.  
  2443.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* Layer 1 */
  2444.     ROM_LOAD( "up001010", 0x000000, 0x080000, 0xbfbab472 )
  2445.     ROM_LOAD( "up001011", 0x080000, 0x080000, 0x26cea381 )
  2446.     ROM_LOAD( "up001012", 0x100000, 0x080000, 0xfed2c5f9 )
  2447.     ROM_LOAD( "up001013", 0x180000, 0x080000, 0xadabf9ea )
  2448.  
  2449.     /* 4KHz? */
  2450.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* Samples */
  2451.     ROM_LOAD( "up001015", 0x000000, 0x080000, 0x2e20e39f )
  2452.     ROM_LOAD( "up001014", 0x080000, 0x080000, 0xfca6315e )
  2453.  
  2454. ROM_END
  2455.  
  2456.  
  2457. void init_metafox(void)
  2458. {
  2459.     unsigned char *RAM;
  2460.  
  2461.     /* This game uses the 21c000-21cfff area for protecton? */
  2462.     install_mem_read_handler (0, 0x200000, 0x2001ff, MRA_NOP);
  2463.     install_mem_write_handler(0, 0x200000, 0x2001ff, MWA_NOP);
  2464.  
  2465.     RAM    = memory_region(REGION_CPU1);
  2466.     WRITE_WORD(&RAM[0x8ab1c], 0x0000);    // patch protection test: "cp error"
  2467.     WRITE_WORD(&RAM[0x8ab1e], 0x0000);
  2468.     WRITE_WORD(&RAM[0x8ab20], 0x0000);
  2469. }
  2470.  
  2471.  
  2472.  
  2473. /***************************************************************************
  2474.  
  2475.                             Mobile Suit Gundam
  2476.  
  2477. Banpresto 1993
  2478. P0-081A
  2479.                                SW2  SW1
  2480.  
  2481. FA-001-008                          FA-001-001
  2482. FA-001-007    X1-002A X1-001A       FA-002-002
  2483.                               5160
  2484.                               5160
  2485.                                         71054
  2486. FA-001-006                    5160     62256
  2487. FA-001-005    X1-011  X1-012  5160     62256
  2488.  
  2489. FA-001-004    X1-011  X1-012  5160
  2490. 5160                          5160
  2491.  
  2492.                                 68000-16
  2493.  
  2494.                                          16MHz
  2495.   X1-010
  2496.                     X1-007   X1-004     X1-005
  2497.  
  2498. ***************************************************************************/
  2499.  
  2500. ROM_START( msgundam )
  2501.  
  2502.     ROM_REGION( 0x200000, REGION_CPU1 )        /* 68000 Code */
  2503.     ROM_LOAD_WIDE_SWAP( "fa002",  0x000000, 0x080000, 0xdee3b083 )
  2504.     ROM_LOAD_WIDE_SWAP( "fa001",  0x100000, 0x100000, 0xfca139d0 )
  2505.  
  2506.     ROM_REGION( 0x400000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* Sprites */
  2507.     ROM_LOAD( "fa008",  0x000000, 0x200000, 0xe7accf48 )
  2508.     ROM_LOAD( "fa007",  0x200000, 0x200000, 0x793198a6 )
  2509.  
  2510.     ROM_REGION( 0x100000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* Layer 1 */
  2511.     ROM_LOAD( "fa006",  0x000000, 0x100000, 0x3b60365c )
  2512.  
  2513.     ROM_REGION( 0x080000, REGION_GFX3 | REGIONFLAG_DISPOSE )    /* Layer 2 */
  2514.     ROM_LOAD( "fa005",  0x000000, 0x080000, 0x8cd7ff86 )
  2515.  
  2516.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* Samples */
  2517.     ROM_LOAD( "fa004",  0x000000, 0x100000, 0xb965f07c )
  2518.  
  2519. ROM_END
  2520.  
  2521.  
  2522.  
  2523.  
  2524.  
  2525.  
  2526. /***************************************************************************
  2527.  
  2528.                                 Thundercade
  2529.  
  2530. ***************************************************************************/
  2531.  
  2532. ROM_START( tndrcade )
  2533.  
  2534.     ROM_REGION( 0x080000, REGION_CPU1 )        /* 68000 Code */
  2535.     ROM_LOAD_EVEN( "ua0-4.1l", 0x000000, 0x020000, 0x73bd63eb )
  2536.     ROM_LOAD_ODD(  "ja02.1h",  0x000000, 0x020000, 0xe96194b1 )
  2537.     ROM_LOAD_EVEN( "ua0-3.1k", 0x040000, 0x020000, 0x0a7b1c41 )
  2538.     ROM_LOAD_ODD(  "ua0-1.1g", 0x040000, 0x020000, 0xfa906626 )
  2539.  
  2540.     ROM_REGION( 0x02c000, REGION_CPU2 )        /* 65c02 Code */
  2541.     ROM_LOAD( "ua10-5.8m", 0x004000, 0x020000, 0x8eff6122 )
  2542.     ROM_RELOAD(            0x00c000, 0x020000             )
  2543.  
  2544.     ROM_REGION( 0x200000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* Sprites */
  2545. #if 1
  2546.     ROM_LOAD( "sprites", 0x000000, 0x080000, 0x00000000 )
  2547. #else
  2548.     // downtown!
  2549.     ROM_LOAD( "ud2005.t01", 0x000000, 0x080000, 0x77e6d249 )
  2550.     ROM_LOAD( "ud2006.t02", 0x080000, 0x080000, 0x6e381bf2 )
  2551.     ROM_LOAD( "ud2007.t03", 0x100000, 0x080000, 0x737b4971 )
  2552.     ROM_LOAD( "ud2008.t04", 0x180000, 0x080000, 0x99b9d757 )
  2553. #endif
  2554.  
  2555. ROM_END
  2556.  
  2557.  
  2558.  
  2559.  
  2560. /***************************************************************************
  2561.  
  2562.                                 Twin Eagle
  2563.  
  2564. M6100326A    Taito (Seta)
  2565.  
  2566. ua2-4              68000
  2567. ua2-3
  2568. ua2-6
  2569. ua2-5
  2570. ua2-8
  2571. ua2-10
  2572. ua2-7               ua2-1
  2573. ua2-9
  2574. ua2-12
  2575. ua2-11              ua2-2
  2576.  
  2577. ***************************************************************************/
  2578.  
  2579. ROM_START( twineagl )
  2580.  
  2581.     ROM_REGION( 0x080000, REGION_CPU1 )        /* 68000 Code */
  2582.     ROM_LOAD_WIDE( "ua2-1", 0x000000, 0x080000, 0x5c3fe531 )
  2583.  
  2584.     ROM_REGION( 0x010000, REGION_CPU2 )        /* 65c02 Code */
  2585.     ROM_LOAD( "ua2-2", 0x006000, 0x002000, 0x783ca84e )
  2586.     ROM_RELOAD(        0x008000, 0x002000  )
  2587.     ROM_RELOAD(        0x00a000, 0x002000  )
  2588.     ROM_RELOAD(        0x00c000, 0x002000  )
  2589.     ROM_RELOAD(        0x00e000, 0x002000  )
  2590.  
  2591.     ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* Sprites */
  2592.     ROM_LOAD( "ua2-4",  0x000000, 0x040000, 0x8b7532d6 )
  2593.     ROM_LOAD( "ua2-3",  0x040000, 0x040000, 0x1124417a )
  2594.     ROM_LOAD( "ua2-6",  0x080000, 0x040000, 0x99d8dbba )
  2595.     ROM_LOAD( "ua2-5",  0x0c0000, 0x040000, 0x6e450d28 )
  2596.  
  2597.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* Layer 1 */
  2598.     ROM_LOAD( "ua2-8",  0x000000, 0x080000, 0x7d3a8d73 )
  2599.     ROM_LOAD( "ua2-10", 0x080000, 0x080000, 0x5bbe1f56 )
  2600.     ROM_LOAD( "ua2-7",  0x100000, 0x080000, 0xfce56907 )
  2601.     ROM_LOAD( "ua2-9",  0x180000, 0x080000, 0xa451eae9 )
  2602.  
  2603.     /* 8KHz? */
  2604.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* Samples */
  2605.     ROM_LOAD( "ua2-11", 0x000000, 0x080000, 0x624e6057 )
  2606.     ROM_LOAD( "ua2-12", 0x080000, 0x080000, 0x3068ff64 )
  2607.  
  2608. ROM_END
  2609.  
  2610.  
  2611. READ_HANDLER( twineagl_protection_r )
  2612. {
  2613.     return 0;
  2614. }
  2615.  
  2616. void init_twineagl(void)
  2617. {
  2618.     int i;
  2619.     unsigned char *RAM;
  2620.  
  2621.     /* Protection? */
  2622.     install_mem_read_handler(0, 0x800000, 0x8000ff, twineagl_protection_r);
  2623.  
  2624.     RAM    = memory_region(REGION_GFX2);
  2625.  
  2626. #if 1
  2627.     // waterfalls: tiles 3e00-3fff must be a copy of 2e00-2fff ??
  2628.     for (i = 0x3e00 * (16*16*2/8); i < 0x3f00 * (16*16*2/8); i++)
  2629.     {
  2630.         RAM[i+0x000000] = RAM[i+0x000000 - 0x700*(16*16*2/8)];
  2631.         RAM[i+0x100000] = RAM[i+0x100000 - 0x700*(16*16*2/8)];
  2632.     }
  2633.  
  2634.  
  2635.     // Sea level:  tiles 3e00-3fff must be a copy of 3700-38ff ??
  2636.     for (i = 0x3f00 * (16*16*2/8); i < 0x4000 * (16*16*2/8); i++)
  2637.     {
  2638.         RAM[i+0x000000] = RAM[i+0x000000 - 0x1000*(16*16*2/8)];
  2639.         RAM[i+0x100000] = RAM[i+0x100000 - 0x1000*(16*16*2/8)];
  2640.     }
  2641.  
  2642. #endif
  2643. }
  2644.  
  2645.  
  2646.  
  2647.  
  2648. /***************************************************************************
  2649.  
  2650.                                 U.S. Classic
  2651.  
  2652. M6100430A (Taito 1989)
  2653.  
  2654.        u7 119  u6 118   u5 117   u4 116
  2655.                                          68000-8
  2656. u13  120                                 000
  2657. u19  121                                 001
  2658. u21  122                                 002
  2659. u29  123                                 003
  2660. u33  124
  2661. u40  125
  2662. u44  126
  2663. u51  127
  2664. u58  128
  2665. u60  129                                 65c02
  2666. u68  130
  2667. u75  131                                 u61 004
  2668.  
  2669.                                          u83 132
  2670.  
  2671. ***************************************************************************/
  2672.  
  2673. ROM_START( usclssic )
  2674.  
  2675.     ROM_REGION( 0x080000, REGION_CPU1 )        /* 68000 Code */
  2676.     ROM_LOAD_EVEN( "ue2001.u20", 0x000000, 0x020000, 0x18b41421 )
  2677.     ROM_LOAD_ODD(  "ue2000.u14", 0x000000, 0x020000, 0x69454bc2 )
  2678.     ROM_LOAD_EVEN( "ue2002.u22", 0x040000, 0x020000, 0xa7bbe248 )
  2679.     ROM_LOAD_ODD(  "ue2003.u30", 0x040000, 0x020000, 0x29601906 )
  2680.  
  2681.     ROM_REGION( 0x04c000, REGION_CPU2 )        /* 65c02 Code */
  2682.     ROM_LOAD( "ue002u61.004", 0x004000, 0x040000, 0x476e9f60 )
  2683.     ROM_RELOAD(               0x00c000, 0x040000             )
  2684.  
  2685.     ROM_REGION( 0x200000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* Sprites */
  2686.     ROM_LOAD( "ue001009.119", 0x000000, 0x080000, 0xdc065204 )
  2687.     ROM_LOAD( "ue001008.118", 0x080000, 0x080000, 0x5947d9b5 )
  2688.     ROM_LOAD( "ue001007.117", 0x100000, 0x080000, 0xb48a885c )
  2689.     ROM_LOAD( "ue001006.116", 0x180000, 0x080000, 0xa6ab6ef4 )
  2690.  
  2691.     ROM_REGION( 0x600000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* Layer 1 */
  2692.     ROM_LOAD( "ue001010.120", 0x000000, 0x080000, 0xdd683031 )    // planes 01
  2693.     ROM_LOAD( "ue001011.121", 0x080000, 0x080000, 0x0e27bc49 )
  2694.     ROM_LOAD( "ue001012.122", 0x100000, 0x080000, 0x961dfcdc )
  2695.     ROM_LOAD( "ue001013.123", 0x180000, 0x080000, 0x03e9eb79 )
  2696.  
  2697.     ROM_LOAD( "ue001014.124", 0x200000, 0x080000, 0x9576ace7 )    // planes 23
  2698.     ROM_LOAD( "ue001015.125", 0x280000, 0x080000, 0x631d6eb1 )
  2699.     ROM_LOAD( "ue001016.126", 0x300000, 0x080000, 0xf44a8686 )
  2700.     ROM_LOAD( "ue001017.127", 0x380000, 0x080000, 0x7f568258 )
  2701.  
  2702.     ROM_LOAD( "ue001018.128", 0x400000, 0x080000, 0x4bd98f23 )    // planes 45
  2703.     ROM_LOAD( "ue001019.129", 0x480000, 0x080000, 0x6d9f5a33 )
  2704.     ROM_LOAD( "ue001020.130", 0x500000, 0x080000, 0xbc07403f )
  2705.     ROM_LOAD( "ue001021.131", 0x580000, 0x080000, 0x98c03efd )
  2706.  
  2707.     /* 4KHz? */
  2708.     ROM_REGION( 0x080000, REGION_SOUND1 )    /* Samples */
  2709.     ROM_LOAD( "ue001005.132", 0x000000, 0x080000, 0xc5fea37c )
  2710.  
  2711. ROM_END
  2712.  
  2713.  
  2714.  
  2715.  
  2716. /***************************************************************************
  2717.  
  2718.                                 Zing Zing Zip
  2719.  
  2720. P0-079A
  2721.  
  2722. UY-001-005   X1-002A   X1-001A   5168-10      256k-12
  2723. UY-001-006                       5168-10      UY-001-001
  2724. UY-001-007                                    UY-001-002
  2725. UY-001-008   X1-011 X1-012                    58257-12
  2726.                                  5168-10
  2727. UY-001-010   X1-011 X1-012       5168-10
  2728. UY-001-017
  2729. UY-001-018
  2730.                                  5168-10
  2731. X1-010                           5168-10       68000-16
  2732.  
  2733.  
  2734.                            8464-80
  2735.                            8464-80       16MHz
  2736.  
  2737.  
  2738.                              X1-007    X1-004
  2739.  
  2740. ***************************************************************************/
  2741.  
  2742. ROM_START( zingzip )
  2743.  
  2744.     ROM_REGION( 0x080000, REGION_CPU1 )        /* 68000 Code */
  2745.     ROM_LOAD_EVEN( "uy001001",  0x000000, 0x040000, 0x1a1687ec )
  2746.     ROM_LOAD_ODD(  "uy001002",  0x000000, 0x040000, 0x62e3b0c4 )
  2747.  
  2748.     ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* Sprites */
  2749.     ROM_LOAD( "uy001016",  0x000000, 0x080000, 0x46e4a7d8 )
  2750.     ROM_LOAD( "uy001015",  0x080000, 0x080000, 0x4aac128e )
  2751.  
  2752.     ROM_REGION( 0x200000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* Layer 1 */
  2753.     ROM_LOAD( "uy001008",  0x000000, 0x200000, 0x0d07d34b ) // FIRST AND SECOND HALF IDENTICAL
  2754.     ROM_LOAD_GFX_EVEN( "uy001007",  0x100000, 0x080000, 0xec5b3ab9 )
  2755.  
  2756.     ROM_REGION( 0x200000, REGION_GFX3 | REGIONFLAG_DISPOSE )    /* Layer 2 */
  2757.     ROM_LOAD( "uy001010",  0x000000, 0x200000, 0x0129408a ) // FIRST AND SECOND HALF IDENTICAL
  2758.  
  2759.     /* 6KHz? */
  2760.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* Samples */
  2761.     ROM_LOAD( "uy001017",  0x000000, 0x080000, 0xd2cda2eb )
  2762.     ROM_LOAD( "uy001018",  0x080000, 0x080000, 0x3d30229a )
  2763.  
  2764. ROM_END
  2765.  
  2766.  
  2767.  
  2768. /***************************************************************************
  2769.  
  2770.                                War of Aero
  2771.                             Project M E I O U
  2772.  
  2773. 93111A    YANG CHENG
  2774.  
  2775. CPU   : TOSHIBA TMP68HC000N-16
  2776. Sound : ?
  2777. OSC   : 16.000000MHz
  2778.  
  2779. ***************************************************************************/
  2780.  
  2781. ROM_START( wrofaero )
  2782.  
  2783.     ROM_REGION( 0x080000, REGION_CPU1 )        /* 68000 Code */
  2784.     ROM_LOAD_EVEN( "u3.bin",  0x000000, 0x040000, 0x9b896a97 )
  2785.     ROM_LOAD_ODD(  "u4.bin",  0x000000, 0x040000, 0xdda84846 )
  2786.  
  2787.     ROM_REGION( 0x100000, REGION_GFX1 | REGIONFLAG_DISPOSE )    /* Sprites */
  2788.     ROM_LOAD( "u64.bin",  0x000000, 0x080000, 0xf06ccd78 )
  2789.     ROM_LOAD( "u63.bin",  0x080000, 0x080000, 0x2a602a1b )
  2790.  
  2791.     ROM_REGION( 0x080000, REGION_GFX2 | REGIONFLAG_DISPOSE )    /* Layer 1 */
  2792.     ROM_LOAD( "u66.bin",  0x000000, 0x080000, 0xc9fc6a0c )
  2793.  
  2794.     ROM_REGION( 0x080000, REGION_GFX3 | REGIONFLAG_DISPOSE )    /* Layer 2 */
  2795.     ROM_LOAD( "u68.bin",  0x000000, 0x080000, BADCRC(0x3b9cc2b9) )
  2796.  
  2797.     ROM_REGION( 0x100000, REGION_SOUND1 )    /* Samples */
  2798.     ROM_LOAD( "u69.bin",  0x000000, 0x080000, 0x957ecd41 )
  2799.     ROM_LOAD( "u70.bin",  0x080000, 0x080000, 0x8d756fdf )
  2800.  
  2801. ROM_END
  2802.  
  2803.  
  2804. void init_wrofaero(void)
  2805. {
  2806.     unsigned char *RAM;
  2807.  
  2808.     RAM    = memory_region(REGION_GFX3);    // layer 2 tile 0 has some
  2809.     RAM[0] = 0;                            // opaque pixels (bad dump)
  2810. }
  2811.  
  2812.  
  2813.  
  2814.  
  2815. /***************************************************************************
  2816.  
  2817.                                 Game Drivers
  2818.  
  2819. ***************************************************************************/
  2820.  
  2821. GAMEX( 1988, tndrcade, 0, tndrcade, tndrcade, 0,        ROT270, "Seta",            "Thundercade",        GAME_IMPERFECT_SOUND )
  2822. GAMEX( 1988, twineagl, 0, twineagl, twineagl, twineagl, ROT270, "Seta (Taito license)", "Twin Eagle (Japan)", GAME_IMPERFECT_SOUND )
  2823. GAMEX( 1989, calibr50, 0, downtown, calibr50, 0,        ROT270, "Seta",            "Caliber 50",         GAME_IMPERFECT_SOUND | GAME_NOT_WORKING )
  2824. GAMEX( 1989, downtown, 0, downtown, downtown, downtown, ROT270, "Seta",            "DownTown",           GAME_IMPERFECT_SOUND ) // Country/License: DSW
  2825. GAMEX( 1989, usclssic, 0, usclssic, usclssic, 0,        ROT270, "Seta",            "U.S. Classic",       GAME_IMPERFECT_SOUND | GAME_WRONG_COLORS ) // Country/License: DSW
  2826. GAMEX( 1989, arbalest, 0, metafox,  arbalest, arbalest, ROT270, "Seta",            "Arbalester",         GAME_IMPERFECT_SOUND ) // Country/License: DSW
  2827. GAMEX( 1989, metafox,  0, metafox,  metafox,  metafox,  ROT270, "Seta",            "Meta Fox",           GAME_IMPERFECT_SOUND ) // Country/License: DSW
  2828. GAMEX( 1992, zingzip,  0, zingzip,  zingzip,  0,        ROT270, "Allumer + Tecmo", "Zing Zing Zip",      GAME_IMPERFECT_SOUND )
  2829. GAMEX( 1993, msgundam, 0, msgundam, msgundam, 0,        ROT0  , "Banpresto",       "Mobile Suit Gundam", GAME_IMPERFECT_SOUND|GAME_NOT_WORKING )
  2830. GAMEX( 1993, wrofaero, 0, wrofaero, wrofaero, wrofaero, ROT270, "Yang Cheng",      "War of Aero - Project MEIOU", GAME_IMPERFECT_SOUND )
  2831.